r""" Fit the model to the data and targets in `X` and `y` Parameters ---------- X : numpy array of shape `(N, M)` An array of `N` examples to generate predictions on. y : numpy array of shape `(N, *)` Targets for the `N` rows in `X`.
(self, X, y)
| 45 | } |
| 46 | |
| 47 | def fit(self, X, y): |
| 48 | r""" |
| 49 | Fit the model to the data and targets in `X` and `y` |
| 50 | |
| 51 | Parameters |
| 52 | ---------- |
| 53 | X : numpy array of shape `(N, M)` |
| 54 | An array of `N` examples to generate predictions on. |
| 55 | y : numpy array of shape `(N, *)` |
| 56 | Targets for the `N` rows in `X`. |
| 57 | """ |
| 58 | if X.ndim != 2: |
| 59 | raise Exception("X must be two-dimensional") |
| 60 | self._ball_tree.fit(X, y) |
| 61 | |
| 62 | def predict(self, X): |
| 63 | r""" |
no outgoing calls