Note

Pandas (17) 본문

Pandas

Pandas (17)

알 수 없는 사용자 2022. 8. 8. 20:14
728x90

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)

'Pandas' 카테고리의 다른 글

Pandas (19)  (0) 2022.08.10
Pandas (18)  (0) 2022.08.09
Pandas (16)  (0) 2022.08.07
Pandas (15)  (0) 2022.08.06
Pandas (14)  (0) 2022.08.05
Comments