preprocessing.py 文件源码

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

项目:mriqc 作者: poldracklab 项目源码 文件源码
def transform(self, X, y=None):
        """Apply dimensionality reduction to X.
        X is masked.
        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            New data, where n_samples is the number of samples
            and n_features is the number of features.
        Returns
        -------
        X_new : array-like, shape (n_samples, n_components)
        """
        from sklearn.utils import check_array
        from sklearn.utils.validation import check_is_fitted
        check_is_fitted(self, ['mask_'], all_or_any=all)
        X = check_array(X)
        return X[:, self.mask_]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号