MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / predict

Method predict

numpy_ml/trees/losses.py:12–15  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

10 self.class_prob = y.sum() / len(y)
11
12 def predict(self, X):
13 pred = np.empty(X.shape[0], dtype=np.float64)
14 pred.fill(self.class_prob)
15 return pred
16
17
18class MeanBaseEstimator:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected