Pandas
Pandas (17)
Jun's N
2022. 8. 8. 20:14
How to compute the mean squared error on a truth and predicted series?
# Input
truth = pd.Series(range(10))
pred = pd.Series(range(10)) + np.random.random(10)
# Solution
np.mean((truth-pred)**2)
728x90