template.py 文件源码

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

项目:project-template 作者: scikit-learn-contrib 项目源码 文件源码
def fit(self, X, y=None):
        """A reference implementation of a fitting function for a transformer.

        Parameters
        ----------
        X : array-like or sparse matrix of shape = [n_samples, n_features]
            The training input samples.
        y : None
            There is no need of a target in a transformer, yet the pipeline API
            requires this parameter.

        Returns
        -------
        self : object
            Returns self.
        """
        X = check_array(X)

        self.input_shape_ = X.shape

        # Return the transformer
        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号