(self, X)
| 38 | self.alphas.append(alpha) |
| 39 | |
| 40 | def predict(self, X): |
| 41 | # NOT like SKLearn API |
| 42 | # we want accuracy and exponential loss for plotting purposes |
| 43 | N, _ = X.shape |
| 44 | FX = np.zeros(N) |
| 45 | for alpha, tree in zip(self.alphas, self.models): |
| 46 | FX += alpha*tree.predict(X) |
| 47 | return np.sign(FX), FX |
| 48 | |
| 49 | def score(self, X, Y): |
| 50 | # NOT like SKLearn API |
no outgoing calls
no test coverage detected