machine_learning.scoring_functions

Functions

mae(predict, actual)

Examples(rounded for precision):

manual_accuracy(predict, actual)

mbd(predict, actual)

This value is Negative, if the model underpredicts,

mse(predict, actual)

Examples(rounded for precision):

rmse(predict, actual)

Examples(rounded for precision):

rmsle(predict, actual)

Examples(rounded for precision):

Module Contents

machine_learning.scoring_functions.mae(predict, actual)

Examples(rounded for precision): >>> actual = [1,2,3];predict = [1,4,3] >>> float(np.around(mae(predict,actual),decimals = 2)) 0.67

>>> actual = [1,1,1];predict = [1,1,1]
>>> float(mae(predict,actual))
0.0
machine_learning.scoring_functions.manual_accuracy(predict, actual)
machine_learning.scoring_functions.mbd(predict, actual)

This value is Negative, if the model underpredicts, positive, if it overpredicts.

Example(rounded for precision):

Here the model overpredicts >>> actual = [1,2,3];predict = [2,3,4] >>> float(np.around(mbd(predict,actual),decimals = 2)) 50.0

Here the model underpredicts >>> actual = [1,2,3];predict = [0,1,1] >>> float(np.around(mbd(predict,actual),decimals = 2)) -66.67

machine_learning.scoring_functions.mse(predict, actual)

Examples(rounded for precision): >>> actual = [1,2,3];predict = [1,4,3] >>> float(np.around(mse(predict,actual),decimals = 2)) 1.33

>>> actual = [1,1,1];predict = [1,1,1]
>>> float(mse(predict,actual))
0.0
machine_learning.scoring_functions.rmse(predict, actual)

Examples(rounded for precision): >>> actual = [1,2,3];predict = [1,4,3] >>> float(np.around(rmse(predict,actual),decimals = 2)) 1.15

>>> actual = [1,1,1];predict = [1,1,1]
>>> float(rmse(predict,actual))
0.0
machine_learning.scoring_functions.rmsle(predict, actual)

Examples(rounded for precision): >>> float(np.around(rmsle(predict=[10, 2, 30], actual=[10, 10, 30]), decimals=2)) 0.75

>>> float(rmsle(predict=[1, 1, 1], actual=[1, 1, 1]))
0.0