MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / score

Method score

supervised_class2/adaboost.py:49–54  ·  view source on GitHub ↗
(self, X, Y)

Source from the content-addressed store, hash-verified

47 return np.sign(FX), FX
48
49 def score(self, X, Y):
50 # NOT like SKLearn API
51 # we want accuracy and exponential loss for plotting purposes
52 P, FX = self.predict(X)
53 L = np.exp(-Y*FX).mean()
54 return np.mean(P == Y), L
55
56
57if __name__ == '__main__':

Callers 3

rf_regression.pyFile · 0.45
adaboost.pyFile · 0.45
rf_vs_bag.pyFile · 0.45

Calls 1

predictMethod · 0.95

Tested by

no test coverage detected