(self, X, Y)
| 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 | |
| 57 | if __name__ == '__main__': |
no test coverage detected