Skip to content

Commit

Permalink
add init_fit
Browse files Browse the repository at this point in the history
  • Loading branch information
qroa committed Dec 16, 2024
1 parent 406b500 commit 1b89d83
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mapie/regression/quantile_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,8 @@ def fit(
MapieQuantileRegressor
The model itself.
"""
self.cv = self._check_cv(cast(str, self.cv))
self.alpha_np = self._check_alpha(self.alpha)
self.estimators_: List[RegressorMixin] = []

self.init_fit()

if self.cv == "prefit":
X_calib, y_calib = self.prefit_estimators(X, y)
Expand All @@ -571,6 +570,12 @@ def fit(

return self

def init_fit(self):

self.cv = self._check_cv(cast(str, self.cv))
self.alpha_np = self._check_alpha(self.alpha)
self.estimators_: List[RegressorMixin] = []

def prefit_estimators(
self,
X: ArrayLike,
Expand Down

0 comments on commit 1b89d83

Please sign in to comment.