preprocessing.py 文件源码

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

项目:Epileptic-Seizure-Prediction 作者: cedricsimar 项目源码 文件源码
def group_into_bands(self, fft, fft_freq, nfreq_bands):

        """ 
        Group the fft result by frequency bands and take the mean
        of the fft values within each band

        Return a list of the frequency bands' means (except the first element
        which is the frequency band 0 - 0.1Hz)
        """

        freq_bands = np.digitize(fft_freq, FREQUENCIES)
        df = DataFrame({'fft': fft, 'band': freq_bands})
        df = df.groupby('band').mean()
        return df.fft[1:-1]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号