shap_explain_selected
Explain a selected breast cancer model with SHAP: return global top features and a local explanation for a chosen test row, showing which features push toward malignant.
Instructions
Run SHAP for the selected model: global top features plus a local explanation for one test row. Positive SHAP values push toward malignant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_k | No | How many top features to return. | |
| test_size | No | Fraction of the data held out for testing. | |
| request_id | No | Your own id for this call; recorded in the audit log. | unknown |
| local_index | No | Test-set row to explain individually. | |
| random_state | No | Random seed for the train/test split. | |
| knn_neighbors | No | Number of neighbors for the KNN model. | |
| selection_rule | No | Rule used to pick the model to explain. | recall_then_precision_then_accuracy |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |