参考论文:The study of c0 complexity on epileptic absence seizure

def C0_complexity(single):
    '''
        计算C0复杂度 
    '''

    x = fft(single)
    N = x.shape[0]

    avgx = np.average(x)    # 计算幅度谱的平均值

    new_x = []
    for i in x:
        if abs(i) > avgx:
            new_x.append(i)
        else:
            new_x.append(0)

    new_x = np.array(new_x)

    new_s = ifft(new_x)

    c0_cplx = 0

    for i in range(single.shape[0]):
        c0_cplx += abs(single[i]-new_s[i]) / abs(single[i])

    return c0_cplx

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐