Random Forest Classifier
random_forest_classifierTrain a random forest classifier on numerical, complete tabular data to produce a model and train/test performance metrics including accuracy, F1, and ROC-AUC.
Instructions
Train a random forest classifier: many decorrelated trees that vote. 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 (str): Features considered per split: "sqrt", "log2" or "all". Default is "sqrt". class_weight (str, optional): "balanced" or "balanced_subsample" to counter imbalanced classes. Default is None. random_state (int): Seed. Default is 42. Returns: dict: model_id, train/test metrics (accuracy, precision, recall, F1, ROC-AUC), 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_classifier"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| split_id | Yes | ||
| max_depth | No | ||
| class_weight | No | ||
| max_features | No | sqrt | |
| n_estimators | No | ||
| random_state | No | ||
| min_samples_leaf | No | ||
| min_samples_split | No |