sklearn.ensemble.RandomTreesEmbedding

From GM-RKB
Jump to navigation Jump to search

A sklearn.ensemble.RandomTreesEmbedding is a Totally Random Trees Embedding System within sklearn.ensemble module.

1) Import the Totally Random Trees Embedding System from scikit-learn : from sklearn.ensemble import RandomTreesEmbedding
2) Generate training data or load observations dataset: X,y
3) Create a Totally Random Trees Embedding System object: rt=RandomTreesEmbedding([n_estimators=10, max_depth=5, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, ...])
4) Choose method(s):
  • apply(X), applies trees in the forest to X, return leaf indices.
  • decision_path(X), returns the decision path in the forest
  • fit(X[, y, sample_weight]), fits estimator.
  • fit_transform(X[, y, sample_weight]), fits estimator and transform dataset.
  • get_params([deep]), gets parameters for this estimator.
  • set_params(**params), sets the parameters of this estimator.
  • transform(X), transform dataset.


References

2017a

2017b

2007

2006