_pipeline.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:palladio 作者: slipguru 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号