Random Forest Regressor
random_forest_regressorTrain a random forest regression model on a prepared train/test split with numerical, complete features to predict numerical targets and return R2, MAE, MSE, RMSE, MAPE, top features, and warnings.
Instructions
Train a random forest regressor: many decorrelated trees averaged together. A strong default for tabular data. The split must have only numerical, complete features (no scaling is needed). Args: split_id (str): ID of a split made by train_test_split. n_estimators (int): Number of trees. Default is 100. max_depth (int, optional): Maximum tree depth. Default is None (unlimited). min_samples_split (int): Minimum rows needed to split a node. Default is 2. min_samples_leaf (int): Minimum rows in a leaf. Default is 1. max_features (float): Fraction of features considered at each split, between 0 and 1. Default is 1.0. random_state (int): Seed. Default is 42. Returns: dict: model_id, train/test metrics (R2, MAE, MSE, RMSE, MAPE), top features and warnings.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"split_id": "<split_id>"
},
"name": "random_forest_regressor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| split_id | Yes | ||
| max_depth | No | ||
| max_features | No | ||
| n_estimators | No | ||
| random_state | No | ||
| min_samples_leaf | No | ||
| min_samples_split | No |