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

Function rmse

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

Source from the content-addressed store, hash-verified

37
38#Root Mean Squared Error
39def rmse(predict, actual):
40 predict = np.array(predict)
41 actual = np.array(actual)
42
43 difference = predict - actual
44 square_diff = np.square(difference)
45 mean_square_diff = square_diff.mean()
46 score = np.sqrt(mean_square_diff)
47 return score
48
49#Root Mean Square Logarithmic Error
50def rmsle(predict, actual):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected