MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / mse

Function mse

machine_learning/scoring_functions.py:28–36  ·  view source on GitHub ↗
(predict, actual)

Source from the content-addressed store, hash-verified

26
27#Mean Squared Error
28def mse(predict, actual):
29 predict = np.array(predict)
30 actual = np.array(actual)
31
32 difference = predict - actual
33 square_diff = np.square(difference)
34
35 score = square_diff.mean()
36 return score
37
38#Root Mean Squared Error
39def rmse(predict, actual):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected