79684522

Date: 2025-06-30 09:21:23
Score: 1.5
Natty:
Report link

You are getting this error because you are trying to call .metric for the log reg model, but it's not a method of logistic regression. A metric in the loop is just a function, like the confusion matrix and precision score, etc., which are imported from scikit-learn. Here's a quick fix up; use this

for metric in metrics: print(f"Metric: {metric.name}\nScore: {metric(y_test, y_preds)}

You call the metrics with the predicted labels, aka results

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Techverx official