Skip to content

Commit 195afe3

Browse files
committed
check_is_fitted addition for test
1 parent 3c0effc commit 195afe3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/linearboost/sefr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ def predict_proba(self, X):
304304
Returns the probability of the sample for each class in the model,
305305
where classes are ordered as they are in ``self.classes_``.
306306
"""
307+
check_is_fitted(self)
307308
norm_coef = np.linalg.norm(self.coef_)
308309
if norm_coef == 0:
309310
# Handle the case of a zero-norm coefficient vector to avoid division by zero

0 commit comments

Comments
 (0)