Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AssemblyAI-Community/Machine-Learning-From-Scratch
/ __init__
Method
__init__
01 KNN/KNN.py:9–10 ·
view source on GitHub ↗
(self, k=3)
Source
from the content-addressed store, hash-verified
7
8
class
KNN:
9
def
__init__(self, k=3):
10
self.k = k
11
12
def
fit(self, X, y):
13
self.X_train = X
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected