Skip to main content
4 votes
Accepted

Make a random forest estimator the exact same of a decision tree

You need to set bootstrap=False in the random forest to disable the subsampling. (I originally commented because I expected there to be more impediments [in ...
Ben Reiniger's user avatar
  • 11.8k
3 votes

List of samples that each tree in a random forest is trained on in Scikit-Learn

I don't think it is possible to get it directly but we may utilize the random seed. random_stateint, RandomState instance or None, default=None Controls both the randomness of the bootstrapping of ...
10xAI's user avatar
  • 5,604
2 votes
Accepted

scikit learn target variable reversed (DecisionTreeClassifier)

It might be because of the conflict of order between model.classes_ and series.unique() For a binary labels, ...
10xAI's user avatar
  • 5,604
2 votes

N-ary decision tree with categorical features

It looks like your features are not really categorical, at least age: with categorical features the possible values are known at training, so normally you cannot ...
Erwan's user avatar
  • 25.4k
1 vote

XGB predict_proba estimates don't match sum of leaves

When you call predict_proba in XGBoost, it returns the probability estimates calculated by averaging the predictions of all the ...
Multivac's user avatar
  • 2,969
1 vote
Accepted

How do the splits points in a decision tree within Random Forest are taken/selected? (Base on which criteria?)

You're asking multiple questions, so I will try to answer them all, and then give a piece of code that I used for exploration. First, here is a summary of how a RandomForestClassifier works: it ...
etiennedm's user avatar
  • 1,395
1 vote

Simple CART model example

In the sklearn docs it is stated that: scikit-learn uses an optimised version of the CART algorithm; however, scikit-learn implementation does not support ...
Peter's user avatar
  • 7,466
1 vote

List of samples that each tree in a random forest is trained on in Scikit-Learn

It is possible, actually. The answer is not too different than the one given by @10xAI, but it is not trying to exploit the order of the random seeds implicitly, since it would break for parallel ...
pixelmitch's user avatar
1 vote

how are split decisions for observations(not features) made in decision trees

Do i also need to try all the combinations of a feature split, for above case, height < 100 & height > 100, then height < & height > 110 & height < 90 & height > 90 ...
Carlos Mougan's user avatar
1 vote

Random selection of variables in each run of python sklearn decision tree (regressio )

The documentation says: random_state : int, RandomState instance, default=None Controls the randomness of the estimator. The features are always randomly permuted at each split, even if splitter is ...
Erwan's user avatar
  • 25.4k
1 vote

Problems with decision tree labeling of nodes

Decision Tree does assign the label based on majority given the attribute test condition and its value. Regarding the class label assignment- In case DT has a longer depth, there might not be ...
BlackCurrant's user avatar

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