features.py 文件源码

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

项目:AutoML-Challenge 作者: postech-mlg-exbrain 项目源码 文件源码
def _calculate(self, X, y, categorical, metafeatures, helpers):
        import sklearn.decomposition
        pca = sklearn.decomposition.PCA(copy=True)
        rs = np.random.RandomState(42)
        indices = np.arange(X.shape[0])
        for i in range(10):
            try:
                rs.shuffle(indices)
                pca.fit(X[indices])
                return pca
            except LinAlgError as e:
                pass
        self.logger.warning("Failed to compute a Principle Component Analysis")
        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号