MCPcopy
hub / github.com/scikit-learn/scikit-learn / predict_proba

Method predict_proba

sklearn/utils/_testing.py:1188–1194  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

1186 return self
1187
1188 def predict_proba(self, X):
1189 check_is_fitted(self)
1190 X = check_array(X)
1191 proba_shape = (X.shape[0], self.classes_.size)
1192 y_proba = np.zeros(shape=proba_shape, dtype=np.float64)
1193 y_proba[:, self._most_frequent_class_idx] = 1.0
1194 return y_proba
1195
1196 def predict(self, X):
1197 y_proba = self.predict_proba(X)

Callers 5

predictMethod · 0.95
check_classifiers_trainFunction · 0.45

Calls 2

check_is_fittedFunction · 0.90
check_arrayFunction · 0.90

Tested by

no test coverage detected