confusion_matrix_metrics
Evaluate Logistic Regression and KNN breast cancer classifiers on the test set: compute confusion matrix, accuracy, and malignant-class precision/recall.
Instructions
Compute the confusion matrix plus accuracy/precision/recall for both models on the test set. Precision and recall are for the malignant class. Confusion matrix order is [malignant, benign]; rows = actual, columns = predicted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 |
| random_state | No | Random seed for the train/test split. | |
| knn_neighbors | No | Number of neighbors for the KNN model. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |