iaf.fit.metrics¶
Implementation of simple metrics.
- iaf.fit.metrics.calc_sse(y: ndarray, y_hat: ndarray)[source]¶
Calculate the Sum of Squared Errors between prediction y_hat and data y.
- Parameters:
y (np.ndarray) – Array of target values.
y_hat (np.ndarray) – Array of predicted values.
- Returns:
sse – Sum of squared errors.
- Return type:
- iaf.fit.metrics.calc_sse_weighed(y: ndarray, y_hat: ndarray, se: ndarray)[source]¶
Calculate the Sum of Squared Errors between prediction y_hat and data y weighed by the standard error vector se.
- Parameters:
y (np.ndarray) – Array of target values.
y_hat (np.ndarray) – Array of predicted values.
se (np.ndarray) – Array of standard error values.
- Returns:
sse – Weighted sum of squared errors.
- Return type:
- iaf.fit.metrics.r_squared(y: ndarray, y_hat: ndarray)[source]¶
Calculate the coefficient of determination R^2 for vectors y_hat and y.
- Parameters:
y (np.ndarray) – Array of target values.
y_hat (np.ndarray) – Array of predicted values.
- Returns:
r_squared – Coefficient of determination R^2
- Return type: