turicreate.random_forest_classifier.RandomForestClassifier¶
-
class
turicreate.random_forest_classifier.
RandomForestClassifier
(proxy)¶ The random forest model can be used as a classifier for predictive tasks.
The prediction is based on a collection of base learners i.e decision tree classifiers and combines them through a technique called random forest.
Different from linear models like logistic regression or SVM, gradient boosted trees can model non-linear interactions between the features and the target. This model is suitable for handling numerical features and categorical features with tens of categories but is less suitable for highly sparse features (text data), or with categorical variables that encode a large number of categories.
This model cannot be constructed directly. Instead, use
turicreate.random_forest_classifier.create()
to create an instance of this model. Additional details on parameter options and code samples are available in the documentation for the create function.See also
Methods
RandomForestClassifier.classify (dataset[, …]) |
Return a classification, for each example in the dataset , using the trained random forest model. |
RandomForestClassifier.evaluate (dataset[, …]) |
Evaluate the model by making predictions of target values and comparing these to actual values. |
RandomForestClassifier.export_coreml (filename) |
Export the model in Core ML format. |
RandomForestClassifier.extract_features (dataset) |
For each example in the dataset, extract the leaf indices of each tree as features. |
RandomForestClassifier.get_feature_importance () |
Get the importance of features used by the model. |
RandomForestClassifier.predict (dataset[, …]) |
A flexible and advanced prediction API. |
RandomForestClassifier.predict_topk (dataset) |
Return top-k predictions for the dataset , using the trained model. |
RandomForestClassifier.save (location) |
Save the model. |
RandomForestClassifier.summary ([output]) |
Print a summary of the model. |