Share Your Experience: Take the 2024 Developer Survey

# Tag Info

## Hot answers tagged decision-trees

Accepted

### Why do we need XGBoost and Random Forest?

It's easier to start with your second question and then go to the first. Bagging Random Forest is a bagging algorithm. It reduces variance. Say that you have very unreliable models, such as ...
• 3,420
Accepted

### Is it necessary to normalize data for XGBoost?

Your rationale is indeed correct: decision trees do not require normalization of their inputs; and since XGBoost is essentially an ensemble algorithm comprised of decision trees, it does not require ...
• 2,018
Accepted

### XGBRegressor vs. xgboost.train huge speed difference?

xgboost.train will ignore parameter n_estimators, while xgboost.XGBRegressor accepts. In <...
• 4,336
Accepted

### How is a splitting point chosen for continuous variables in decision trees?

In order to come up with a split point, the values are sorted, and the mid-points between adjacent values are evaluated in terms of some metric, usually information gain or gini impurity. For your ...
• 3,940
Accepted

### How to normalize data for Neural Network and Decision Forest

I disagree with the other comments. First of all, I see no need to normalize data for decision trees. Decision trees work by calculating a score (usually entropy) for each different division of the ...
• 3,420
Accepted

### Decision trees: leaf-wise (best-first) and level-wise tree traverse

If you grow the full tree, best-first (leaf-wise) and depth-first (level-wise) will result in the same tree. The difference is in the order in which the tree is expanded. Since we don't normally grow ...
• 3,258

### How to predict probabilities in xgboost using R?

Just use predict_proba instead of predict. You can leave the objective as binary:logistic.
• 1,357

### When should I use Gini Impurity as opposed to Information Gain (Entropy)?

Gini is intended for continuous attributes and Entropy is for attributes that occur in classes Gini is to minimize misclassification Entropy is for exploratory analysis Entropy is a little ...
• 313

• 91
Accepted

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

There may be a few reason this is happening. First of all, check your code. 100% accuracy seems unlikely in any setting. How many testing data points do you have? How many training data points did ...
• 156