Decision Tree Regressor
decision_tree_regressorTrain an interpretable decision tree regression model on numerical, complete data from a prepared split, with optional depth limits, and return train/test metrics, top features, and warnings.
Instructions
Train a decision tree regressor. Easy to interpret, captures non-linear effects, but overfits easily when max_depth is not limited. 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. max_depth (int, optional): Maximum tree depth. Default is None (unlimited); 3-10 is a common range. 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. 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": "decision_tree_regressor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| split_id | Yes | ||
| max_depth | No | ||
| random_state | No | ||
| min_samples_leaf | No | ||
| min_samples_split | No |