mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-07 08:07:49 +00:00
feat(Models): added MAE & RMSE metrics, fixed NaN & Inf values in data,
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
from math import sqrt
|
||||
from sklearn.metrics import mean_squared_error, mean_absolute_error
|
||||
|
||||
def print_metrics(y_true, y_pred):
|
||||
rmse = sqrt(mean_squared_error(y_true, y_pred))
|
||||
print("RMSE: %.2f" % rmse)
|
||||
|
||||
mae = mean_absolute_error(y_true, y_pred)
|
||||
print("MAE: %.2f" % mae)
|
||||
Reference in New Issue
Block a user