time_freq.py 文件源码

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

项目:apicultor 作者: sonidosmutantes 项目源码 文件源码
def find_number_of_sources(cosine_distance):
    cos_dist = np.resize(cosine_distance, new_shape = (len(cosine_distance), len(cosine_distance))) 
    ap = AP(affinity = 'precomputed').fit(cos_dist)
    counter = Counter(ap.labels_).most_common()
    source = 0
    for i in xrange(len(counter)):
        if counter[i][1] == counter[0][1]:     
            source += 1
    return source
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号