MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / fit

Method fit

supervised_class/knn.py:26–28  ·  view source on GitHub ↗
(self, X, y)

Source from the content-addressed store, hash-verified

24 self.k = k
25
26 def fit(self, X, y):
27 self.X = X
28 self.y = y
29
30 def predict(self, X):
31 y = np.zeros(len(X))

Callers 6

knn_donut.pyFile · 0.45
knn_xor.pyFile · 0.45
app_trainer.pyFile · 0.45
knn.pyFile · 0.45
knn_fail.pyFile · 0.45
regression.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected