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

Function mbd

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

Source from the content-addressed store, hash-verified

64
65#Mean Bias Deviation
66def mbd(predict, actual):
67 predict = np.array(predict)
68 actual = np.array(actual)
69
70 difference = predict - actual
71 numerator = np.sum(difference) / len(predict)
72 denumerator = np.sum(actual) / len(predict)
73 print(numerator)
74 print(denumerator)
75
76 score = float(numerator) / denumerator * 100
77
78 return score

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected