When evaluating a trained model, follow these steps:
- Load the trained model (check
output/directory for joblib or pickle files) - Load test data and generate predictions
- Determine the task type (regression or classification) and compute appropriate metrics:
- Regression: RMSE, MAE, R-squared, MAPE
- Classification: accuracy, precision, recall, F1-score, confusion matrix
- Generate diagnostic plots:
- Regression: predicted vs actual scatter, residuals vs predicted
- Classification: confusion matrix heatmap, ROC curve if applicable
- Create a feature importance chart if the model supports it (tree-based models, linear coefficients)
- Write an evaluation report to
output/evaluation_report.mdwith:- A metrics summary table
- Key findings and observations
- Recommendations for improvement
- Save all plots to the
output/directory
Use polars for data handling. Log all metrics using the project's logging format. Follow the coding standards in CLAUDE.md.
If $ARGUMENTS specifies a model path or details, use that. Otherwise, look for models in the output/ directory.