MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / predict

Method predict

mla/base/base.py:53–60  ·  view source on GitHub ↗
(self, X=None)

Source from the content-addressed store, hash-verified

51 self._setup_input(X, y)
52
53 def predict(self, X=None):
54 if not isinstance(X, np.ndarray):
55 X = np.array(X)
56
57 if self.X is not None or not self.fit_required:
58 return self._predict(X)
59 else:
60 raise ValueError("You must call `fit` before `predict`")
61
62 def _predict(self, X=None):
63 raise NotImplementedError()

Callers

nothing calls this directly

Calls 1

_predictMethod · 0.95

Tested by

no test coverage detected