Skip to main content
5 votes

Decision Tree only splits to the left

This is the typical behavior if you have only one one-hot-encoded feature. Explanation With a single one-hot-encoded feature, the feature-vector has the form of an $n$-dimensional vector where ...
Broele's user avatar
  • 1,362
3 votes
Accepted

How exactly do decision trees split the input region?

Long story short: The border will be between the right-most "left" point and the left-most "right" point. That's because the algorithm will sort your data points by one feature (in ...
Valentin Calomme's user avatar
3 votes
Accepted

Difference among ID3, C4.5, C5.0

According to wikipedia: C5.0 offers a number of improvements on C4.5. Some of these are:[6][7] Speed - C5.0 is significantly faster than C4.5 (several orders of magnitude) Memory usage - C5.0 is ...
noe's user avatar
  • 26.7k
2 votes
Accepted

Can the product of tree regressions be represented by a single tree?

Yes, it is possible to find a tree that represents the product. An easy way to do so is to extend the first tree in each leaf with the second tree. Example Assume there are theses two tree: A ...
Broele's user avatar
  • 1,362
2 votes
Accepted

Distilling a Random Forest to a single DecisionTree, does it make sense?

No, this decision tree is unable to "generalize in the same way as the original random forest". The author also clearly states this in section Does this aproximation hold for unseen data?: '....
lpounng's user avatar
  • 1,008
1 vote

Why is it called *Information Gain* and not *Information Loss*?

Surprise and randomness aren't the same thing. A signal that contains more surprising information is more informationally valuable than one that contains less surprising information, but that has ...
Jeremiah's user avatar
  • 156
1 vote

DecisionTreeRegressor with criterion='poisson' not recognizing perfect separation

When using the code above, with scikit-learn 1.2.2 (released in March 2023), I get the expected result: It could have been a matter of the package's version and the corrections made in the meantime (...
hanna's user avatar
  • 111
1 vote
Accepted

ValueError: X has 54 features, but DecisionTreeClassifier is expecting 53 features as input

Where you do pred_set.drop(["Winner"], axis=1) you need to add inPlace=True, or assign to a new dataframe, otherwise nothing happens. ...
brewmaster321's user avatar
1 vote

How to calculate the training accuracy of a decision tree?

A decision tree assigns one prediction (in your case "Yes" or "No") to each leaf-node (in your case this would be Nodes 2, 4, 7, 8). Each sample is then mapped to exactly one leaf ...
Broele's user avatar
  • 1,362
1 vote

Decision Tree : why do unused features impact predictions?

My guess is multicollinearity: some of the predictors are correlated and removing one may change the relationships between the remainining predictors and the response variable. Also while calculating ...
Memristor's user avatar
  • 256
1 vote
Accepted

Decision trees vs Oblique decision trees

An oblique decision tree is a decision tree in which the conditions used to split the data put a constraint over a linear combination of the features. Say that you have a dependent variable $Y$ that ...
Mehdi Charife's user avatar
1 vote

How does class_weight work in Decision Tree

The way to incorporate weights into a tree is in the split criteria. These are sample weights, meaning each observation $i$ has an associated weight to it $w_i$. E.g., in the case of classification ...
Maverick Meerkat's user avatar
1 vote

I got 100% accuracy on my test set,is there something wrong?

Also check if one of tour predictores is a derived features from the Target variable, u can do that check-in with value_counts on ur Target and also on variables where You SEE too much similarity. You ...
Victor Henostroza's user avatar
1 vote

How to interpret continuous variables in a decision tree model?

Calculate the Pearson correlation coefficient or the Spearman rank correlation coefficient between feature X and target Y. The correlation coefficient quantifies the direction and strength of the ...
technik's user avatar
  • 391

Only top scored, non community-wiki answers of a minimum length are eligible