Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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.py
File · 0.45
knn_xor.py
File · 0.45
app_trainer.py
File · 0.45
knn.py
File · 0.45
knn_fail.py
File · 0.45
regression.py
File · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected