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

Method fit

supervised_class/dt.py:171–173  ·  view source on GitHub ↗
(self, X, Y)

Source from the content-addressed store, hash-verified

169 self.max_depth = max_depth
170
171 def fit(self, X, Y):
172 self.root = TreeNode(max_depth=self.max_depth)
173 self.root.fit(X, Y)
174
175 def predict(self, X):
176 return self.root.predict(X)

Callers

nothing calls this directly

Calls 2

TreeNodeClass · 0.85
fitMethod · 0.45

Tested by

no test coverage detected