Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/ddbourgin/numpy-ml
/ ClassProbEstimator
Class
ClassProbEstimator
numpy_ml/trees/losses.py:8–15 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
6
7
8
class
ClassProbEstimator:
9
def
fit(self, X, y):
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
18
class
MeanBaseEstimator:
Callers
1
base_estimator
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected