feature_importance
Rank features by predictive power using tree-based models or mutual information. Returns a ranked list with importance scores to focus modeling on key variables.
Instructions
Compute feature importance using tree-based model or mutual information. Methods: 'random_forest', 'mutual_info_classif', 'mutual_info_regression'. Returns ranked list of features with importance scores. Run after all encoding and feature engineering. Ranks features by predictive power. Helps focus modeling on most important features. Example: feature_importance(target_column="Revenue", method="random_forest", top_n=20)
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": {
"target_column": "<target_column>"
},
"name": "feature_importance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| method | No | random_forest | |
| df_name | No | ||
| target_column | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |