
1
Posted by jag •
aqora upload
to get the use case data. All is good.1
Posted by jag •
2
Posted by jag •
1
Posted by jag • (edited)
import numpy as np
from sklearn.metrics import mean_squared_error, mean_absolute_error, mean_absolute_percentage_error, r2_score
mse = mean_squared_error(y_targets, y_preds)
rmse = np.sqrt(mse)
mae = mean_absolute_error(y_targets, y_preds)
mape = mean_absolute_percentage_error(np.abs(y_targets), np.abs(y_preds))
r2 = r2_score(y_targets, y_preds)
print(f"RMSE: {rmse:.4f}")
print(f"MAE: {mae:.4f}")
print(f"MAPE: {mape:.2%}")
print(f"R²: {r2:.4f}")
2
Posted by jag •