autoreject.py 文件源码

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

项目:autoreject 作者: autoreject 项目源码 文件源码
def fit(self, X, y=None):
        """Fit it."""
        if self.n_channels is None or self.n_times is None:
            raise ValueError('Cannot fit without knowing n_channels'
                             ' and n_times')
        X = X.reshape(-1, self.n_channels, self.n_times)
        deltas = np.array([np.ptp(d, axis=1) for d in X])
        epoch_deltas = deltas.max(axis=1)
        keep = epoch_deltas <= self.thresh
        self.mean_ = _slicemean(X, keep, axis=0)
        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号