githubEdit

Regression Metrics

MSE (Mean Squared Error)

Measures the average squared difference between predicted and actual values, penalizing larger errors:

MSE=1Ni=1N(yiy^i)2MSE = \frac{1}{N} \sum_{i=1}^N (y_i - \hat{y}_i)^2

MAE (Mean Absolute Error)

Measures the average absolute difference between predicted and actual values, reflecting the magnitude of errors:

MAE=1Ni=1Nyiy^iMAE = \frac{1}{N} \sum_{i=1}^N |y_i - \hat{y}_i|

RMSE (Root Mean Squared Error)

Represents the square root of MSE, interpretable in the same units as the target variable, highlighting larger errors:

RMSE=MSE=1Ni=1N(yiy^i)2RMSE = \sqrt{MSE} = \sqrt{\frac{1}{N} \sum_{i=1}^N (y_i - \hat{y}_i)^2}

Example

Below is an example of the regression metrics API usage:

import requests

url = f"http://{CLUSTER_IP}/metrics-server/api/v1/metrics/pipeline/regression"

params = {
    'namespace': 'seldon',
    'pipelineName': 'house-value-pipeline',
    'modelName': 'house-value-model',
    'startTime': '2025-02-25T16:02:28Z',
    'endTime': '2025-02-25T16:04:28Z',
    'interval': '5s'
}

response = requests.get(url, params=params)
chevron-rightExpand to see an example of the regression metrics API responsehashtag

Last updated

Was this helpful?