def fit(self, X, y=None):
"""Fitting function on the data."""
if self.data_normalizer is not None:
X = self.normalize_data(X)
if self.label_normalizer is not None:
y = self.normalize_label(y)
if self.force_classifier:
clf = make_classifier(self.learner, params=self.learner_options)
elif callable(self.learner):
# self.learner = type(self.learner)
clf = self.learner(**self.learner_options)
else:
clf = self.learner
self.gs_ = GridSearchCV(estimator=clf, **self.cv_options)
self.gs_.fit(X, y)
评论列表
文章目录