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

Method _predict

mla/knn.py:31–34  ·  view source on GitHub ↗
(self, X=None)

Source from the content-addressed store, hash-verified

29 raise NotImplementedError()
30
31 def _predict(self, X=None):
32 predictions = [self._predict_x(x) for x in X]
33
34 return np.array(predictions)
35
36 def _predict_x(self, x):
37 """Predict the label of a single instance x."""

Callers

nothing calls this directly

Calls 1

_predict_xMethod · 0.95

Tested by

no test coverage detected