Regression Metrics
regression_metricsCompute regression metrics (R2, MAE, MSE, RMSE, MAPE, bias) from a trained model or true and predicted value lists to evaluate and compare model accuracy.
Instructions
Compute regression metrics: R2, MAE, MSE, RMSE and MAPE, plus bias, median and maximum absolute error. Use EITHER a trained model (model_id) OR your own lists of true and predicted values. MAPE is given in percent and skips rows whose true value is 0. Args: model_id (str, optional): ID of a trained regression model. Metrics are recomputed from its stored data. dataset (str): "test", "train" or "both". Only used with model_id. Default is "test". y_true (list[float], optional): True values (use together with y_pred). y_pred (list[float], optional): Predicted values, same length as y_true. Returns: dict: The metrics (one block per dataset when dataset="both").
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "regression_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| y_pred | No | ||
| y_true | No | ||
| dataset | No | test | |
| model_id | No |