Feature Importance Plot
feature_importance_plotGenerates and saves a bar chart of a trained model's most important features using feature_importances_ or absolute coef_, returning top features with importance values and the image filename.
Instructions
Generate and save a bar chart of the most important features of a trained model. Uses feature_importances_ (tree models) or absolute coef_ (linear models). Args: model_id (str): ID of the trained model. top_n (int): Number of top features to show. Default is 15. Returns: dict: Model ID, top features with importance values, and saved image filename.
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": {
"model_id": "<model_id>"
},
"name": "feature_importance_plot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| model_id | Yes |