Sklearn Random Forest icon

Sklearn Random Forest

Random Forest classifier and regressor using scikit-learn

Actions2

Predict

AI-generated

Summary

Makes predictions using a trained Random Forest model. Input items are augmented with a prediction field (and class probabilities when the model is a classifier).

Inputs

  • input (required) — Items containing the feature columns specified in the Feature Columns parameter.

Output shape

array

Each input item with added 'prediction' field; for classifiers also a 'probabilities' field containing class probabilities.

Examples

Example 1: Predicting house prices with a trained regressor

model_type=regressor, model_data=, predict_feature_columns=area,bedrooms,age, python_path=python3

Example 2: Classifying iris species with a trained classifier

model_type=classifier, model_data=, predict_feature_columns=sepal_length,sepal_width,petal_length,petal_width, python_path=python3

Discussion