Generalized Linear Models, Tutorial 2, Coding Exercise 2.4 Solution. --student feedback
faezesarlakifar opened this issue · comments
Faezeh Sarlakifar commented
It is good to consider the actual formula for accuracy. It is correct here because all of the record predictions are accurate, resulting in a 100% accuracy rate, even when calculating the mean value. However, providing a clearer explanation of the accuracy formula, especially since it is defined here for the first time, would be beneficial. I suggest changing this line:
From: "accuracy = (y == y_pred).mean()"
To: "accuracy: (y == y_pred).sum() / len(y)"
Spiros Chavlis commented
@faezesarlakifar Thank you for your feedback. We will change this in next iteration of updates and fixes.