[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"me":3,"catalog:en:ml-engineer\u002Fcml-trees-randomforest-internals":4,"config":148},null,{"field_key":5,"field_name":6,"seniority":7,"topic_key":8,"topic_name":9,"spec_key":7,"spec_name":7,"locale":10,"cell_total":11,"field_total":12,"seniorities":13,"topics":17,"specs":58,"samples":63},"ml-engineer","ML Engineer","","cml-trees-randomforest-internals","Cml Trees Randomforest Internals","en",75,1050,[14,15,16],"junior","mid","senior",[18,21,24,27,30,33,34,37,40,43,46,49,52,55],{"key":19,"name":20,"count":11},"cml-distance-clustering-dimreduction","Cml Distance Clustering Dimreduction",{"key":22,"name":23,"count":11},"cml-gradient-boosting-mechanics","Cml Gradient Boosting Mechanics",{"key":25,"name":26,"count":11},"cml-linear-logistic-internals","Cml Linear Logistic Internals",{"key":28,"name":29,"count":11},"cml-probabilistic-models-calibration","Cml Probabilistic Models Calibration",{"key":31,"name":32,"count":11},"cml-svm-kernels-margins","Cml Svm Kernels Margins",{"key":8,"name":9,"count":11},{"key":35,"name":36,"count":11},"ml-data-preparation","Ml Data Preparation",{"key":38,"name":39,"count":11},"ml-deployment-serving","Ml Deployment Serving",{"key":41,"name":42,"count":11},"ml-experimentation-reproducibility","Ml Experimentation Reproducibility",{"key":44,"name":45,"count":11},"ml-model-selection-tuning","Ml Model Selection Tuning",{"key":47,"name":48,"count":11},"ml-model-training-evaluation","Ml Model Training Evaluation",{"key":50,"name":51,"count":11},"ml-monitoring-drift","Ml Monitoring Drift",{"key":53,"name":54,"count":11},"ml-problem-framing","Ml Problem Framing",{"key":56,"name":57,"count":11},"ml-scaling-performance","Ml Scaling Performance",[59],{"key":60,"name":61,"count":62},"classical-ml","Classical ML",450,[64,82,96,109,122,135],{"id":65,"topic":9,"difficulty":66,"body":67,"options":68,"correct_key":73,"explanation":81},"01a03e80-273d-7551-94d1-8c1104c30459",1,"A decision tree node holds 4 training samples: 3 of class A and 1 of class B. What is the Gini impurity of this node?",[69,72,75,78],{"key":70,"text":71},"a","0.250, because one of the four samples belongs to the minority class of the node",{"key":73,"text":74},"b","0.375, because it is 1 minus the sum of the squared class proportions",{"key":76,"text":77},"c","0.750, because impurity is the share of the node held by the majority class",{"key":79,"text":80},"d","0.811, because impurity sums each class proportion times its base-2 logarithm","Gini impurity is 1 - sum(p_k^2) over the classes present in the node. With proportions 0.75 and 0.25 this gives 1 - (0.5625 + 0.0625) = 0.375. The value 0.811 is the Shannon entropy of the same node in bits, which is what the entropy criterion would report instead.",{"id":83,"topic":9,"difficulty":84,"body":85,"options":86,"correct_key":76,"explanation":95},"01a03e80-2740-7bb0-8741-6aec9df644d6",2,"In a binary classification tree, which node composition maximizes Gini impurity, and what is that maximum?",[87,89,91,93],{"key":70,"text":88},"A node where one class holds about 75 percent of the samples; the maximum is 0.75",{"key":73,"text":90},"A node containing a single sample, since a lone sample carries no evidence; the maximum is 1.0",{"key":76,"text":92},"A node split evenly between the two classes; the maximum is 0.5",{"key":79,"text":94},"A node whose two classes are in a 2-to-1 ratio; the maximum is roughly 0.44","For two classes with proportion p, Gini is 1 - p^2 - (1-p)^2 = 2p(1-p), which peaks at p = 0.5 with value 0.5. A pure node gives 0, and any imbalance moves the value below 0.5. Node size alone does not enter the formula, only the class proportions do.",{"id":97,"topic":9,"difficulty":84,"body":98,"options":99,"correct_key":70,"explanation":108},"01a03e80-2741-7146-a348-066862c4fb86","A node holds 8 samples, 4 positive and 4 negative. A candidate split sends 4 samples to the left child (3 positive, 1 negative) and 4 to the right child (1 positive, 3 negative). What Gini gain does this split produce?",[100,102,104,106],{"key":70,"text":101},"0.125, since the parent's 0.5 drops to a weighted child impurity of 0.375",{"key":73,"text":103},"0.250, since each child improves on the parent by half of its own impurity value",{"key":76,"text":105},"0.500, since the parent impurity is fully removed once the node has been split",{"key":79,"text":107},"0.750, since the gain adds up the impurity that each of the two children removed","Both children have Gini 1 - (0.75^2 + 0.25^2) = 0.375, and each holds half the samples, so the weighted child impurity is also 0.375. Subtracting it from the parent's 0.5 leaves a gain of 0.125. The gain is always the parent impurity minus the sample-weighted average of the children, never a sum over children.",{"id":110,"topic":9,"difficulty":84,"body":111,"options":112,"correct_key":79,"explanation":121},"01a03e80-2748-7e59-926e-653aaf1eeee5","In scikit-learn 1.6, DecisionTreeClassifier accepts criterion values \"gini\", \"entropy\" and \"log_loss\". How do \"entropy\" and \"log_loss\" relate to each other?",[113,115,117,119],{"key":70,"text":114},"\"log_loss\" measures the calibration error of the leaf probabilities rather than node purity",{"key":73,"text":116},"\"log_loss\" applies entropy but weights each class by its inverse frequency in the node",{"key":76,"text":118},"\"log_loss\" evaluates a split with cross-entropy against the parent's predicted distribution",{"key":79,"text":120},"They name the same Shannon-entropy impurity measure and build identical trees","In scikit-learn 1.6 \"log_loss\" is an alias of \"entropy\": both compute -sum(p_k * log2(p_k)) for the node, so fitting with either name yields the same thresholds and the same impurity array. The alias exists only to align the tree criterion name with the loss vocabulary used elsewhere in the library.",{"id":123,"topic":9,"difficulty":84,"body":124,"options":125,"correct_key":70,"explanation":134},"01a03e80-2749-75b6-88db-87537447c439","A node holds 6 samples whose values on one continuous feature are [1, 1, 2, 2, 5, 9]. With splitter=\"best\", how many candidate thresholds does scikit-learn evaluate on this feature at this node?",[126,128,130,132],{"key":70,"text":127},"3, one midpoint between each pair of neighbouring distinct values",{"key":73,"text":129},"5, one boundary between each pair of neighbouring rows after sorting",{"key":76,"text":131},"6, one threshold placed exactly at each sample value in the node",{"key":79,"text":133},"9, one threshold per integer step across the observed value range","The best splitter sorts the feature and considers a threshold only between two adjacent distinct values, placing it at their midpoint, so the four distinct values 1, 2, 5 and 9 give three candidates at 1.5, 3.5 and 7.0. Repeated values cannot be separated by a threshold, which is why duplicates do not add candidates.",{"id":136,"topic":9,"difficulty":84,"body":137,"options":138,"correct_key":76,"explanation":147},"01a03e80-2750-7e6c-8291-575e35b17949","Using scikit-learn 1.6:\n\n```python\nX = [[1.0], [2.0], [10.0], [20.0]]\ny = [0, 0, 1, 1]\nclf = DecisionTreeClassifier(max_depth=1).fit(X, y)\nprint(clf.tree_.threshold[0])\n```\n\nWhat is printed?",[139,141,143,145],{"key":70,"text":140},"2.0, the largest feature value that still belongs to the negative class",{"key":73,"text":142},"5.5, the arithmetic mean of the four feature values present in the node",{"key":76,"text":144},"6.0, the midpoint between the two values on either side of the boundary",{"key":79,"text":146},"10.0, the smallest feature value that already belongs to the positive class","The best split separates 2.0 from 10.0, and scikit-learn stores the threshold as the midpoint of that adjacent pair, so (2.0 + 10.0) \u002F 2 = 6.0 is printed. The split condition is X \u003C= threshold, and any value in the open interval between the two neighbours would separate the same rows; the midpoint is chosen deterministically.",{"fields":149,"seniorities":370,"interview_shapes":371,"locales":376,"oauth":378,"question_count":381,"coach_enabled":382,"jd_match_enabled":382},[150,175,195,212,236,249,268,287,309,328,343,365],{"key":151,"name_tr":152,"name_en":152,"sort":66,"specializations":153},"backend","Backend",[154,157,160,163,166,169,172],{"key":155,"name":156,"field":151},"general","Genel",{"key":158,"name":159,"field":151},"go","Go",{"key":161,"name":162,"field":151},"python","Python",{"key":164,"name":165,"field":151},"java","Java",{"key":167,"name":168,"field":151},"csharp","C#\u002F.NET",{"key":170,"name":171,"field":151},"nodejs","Node.js",{"key":173,"name":174,"field":151},"php","PHP",{"key":176,"name_tr":177,"name_en":177,"sort":84,"specializations":178},"frontend","Frontend",[179,180,183,186,189,192],{"key":155,"name":156,"field":176},{"key":181,"name":182,"field":176},"javascript","JavaScript",{"key":184,"name":185,"field":176},"typescript","TypeScript",{"key":187,"name":188,"field":176},"react","React",{"key":190,"name":191,"field":176},"vue","Vue",{"key":193,"name":194,"field":176},"angular","Angular",{"key":196,"name_tr":197,"name_en":197,"sort":198,"specializations":199},"fullstack","Fullstack",3,[200,201,202,203,204,205,206,207,208,209,210,211],{"key":155,"name":156,"field":196},{"key":158,"name":159,"field":151},{"key":161,"name":162,"field":151},{"key":164,"name":165,"field":151},{"key":167,"name":168,"field":151},{"key":170,"name":171,"field":151},{"key":173,"name":174,"field":151},{"key":181,"name":182,"field":176},{"key":184,"name":185,"field":176},{"key":187,"name":188,"field":176},{"key":190,"name":191,"field":176},{"key":193,"name":194,"field":176},{"key":213,"name_tr":214,"name_en":214,"sort":215,"specializations":216},"devops-cloud","DevOps \u002F Cloud",4,[217,218,221,224,227,230,233],{"key":155,"name":156,"field":213},{"key":219,"name":220,"field":213},"aws","AWS",{"key":222,"name":223,"field":213},"gcp","GCP",{"key":225,"name":226,"field":213},"azure","Azure",{"key":228,"name":229,"field":213},"kubernetes","Kubernetes",{"key":231,"name":232,"field":213},"terraform","Terraform",{"key":234,"name":235,"field":213},"linux","Linux",{"key":237,"name_tr":238,"name_en":238,"sort":239,"specializations":240},"ai-engineer","AI Engineer",5,[241,242,243,246],{"key":155,"name":156,"field":237},{"key":161,"name":162,"field":237},{"key":244,"name":245,"field":237},"llm-rag","LLM\u002FRAG",{"key":247,"name":248,"field":237},"mlops","MLOps",{"key":250,"name_tr":251,"name_en":252,"sort":253,"specializations":254},"database","Veritabanı","Database",6,[255,256,259,262,265],{"key":155,"name":156,"field":250},{"key":257,"name":258,"field":250},"postgresql","PostgreSQL",{"key":260,"name":261,"field":250},"mysql","MySQL",{"key":263,"name":264,"field":250},"mongodb","MongoDB",{"key":266,"name":267,"field":250},"redis","Redis",{"key":269,"name_tr":270,"name_en":271,"sort":272,"specializations":273},"mobile","Mobil","Mobile",7,[274,275,278,281,284],{"key":155,"name":156,"field":269},{"key":276,"name":277,"field":269},"ios-swift","iOS (Swift)",{"key":279,"name":280,"field":269},"android-kotlin","Android (Kotlin)",{"key":282,"name":283,"field":269},"flutter","Flutter",{"key":285,"name":286,"field":269},"react-native","React Native",{"key":288,"name_tr":289,"name_en":290,"sort":291,"specializations":292},"security","Güvenlik","Security",8,[293,294,297,300,303,306],{"key":155,"name":156,"field":288},{"key":295,"name":296,"field":288},"appsec","AppSec",{"key":298,"name":299,"field":288},"offensive-pentest","Offensive \u002F Pentest",{"key":301,"name":302,"field":288},"cloud-security","Cloud Security",{"key":304,"name":305,"field":288},"devsecops","DevSecOps",{"key":307,"name":308,"field":288},"blue-team-incident","Blue Team \u002F Incident",{"key":310,"name_tr":311,"name_en":312,"sort":313,"specializations":314},"qa-test-automation","QA \u002F Test Otomasyonu","QA \u002F Test Automation",9,[315,316,319,322,325],{"key":155,"name":156,"field":310},{"key":317,"name":318,"field":310},"test-automation","Test Automation",{"key":320,"name":321,"field":310},"sdet","SDET",{"key":323,"name":324,"field":310},"performance-testing","Performance Testing",{"key":326,"name":327,"field":310},"mobile-qa","Mobile QA",{"key":329,"name_tr":330,"name_en":330,"sort":331,"specializations":332},"data-engineer","Data Engineer",10,[333,334,337,340],{"key":155,"name":156,"field":329},{"key":335,"name":336,"field":329},"pipelines-etl","Pipelines \u002F ETL",{"key":338,"name":339,"field":329},"streaming","Streaming",{"key":341,"name":342,"field":329},"warehousing","Warehousing",{"key":344,"name_tr":345,"name_en":346,"sort":347,"specializations":348},"game-dev","Oyun Geliştirme","Game Development",11,[349,350,353,356,359,362],{"key":155,"name":156,"field":344},{"key":351,"name":352,"field":344},"unity-csharp","Unity (C#)",{"key":354,"name":355,"field":344},"unreal-cpp","Unreal (C++)",{"key":357,"name":358,"field":344},"gameplay","Gameplay",{"key":360,"name":361,"field":344},"graphics-rendering","Graphics \u002F Rendering",{"key":363,"name":364,"field":344},"multiplayer-netcode","Multiplayer \u002F Netcode",{"key":5,"name_tr":6,"name_en":6,"sort":366,"specializations":367},12,[368,369],{"key":155,"name":156,"field":5},{"key":60,"name":61,"field":5},[14,15,16],{"junior":372,"mid":374,"senior":375},{"questions":373,"median_sec":3},20,{"questions":373,"median_sec":3},{"questions":373,"median_sec":3},[377,10],"tr",[379,380],"google","github",27600,true]