MCPcopy Create free account
hub / github.com/AssemblyAI-Community/Machine-Learning-From-Scratch / predict

Method predict

01 KNN/KNN.py:16–18  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

14 self.y_train = y
15
16 def predict(self, X):
17 predictions = [self._predict(x) for x in X]
18 return predictions
19
20 def _predict(self, x):
21 # compute the distance

Callers 1

train.pyFile · 0.45

Calls 1

_predictMethod · 0.95

Tested by

no test coverage detected