utils.py 文件源码

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

项目:crayimage 作者: yandexdataschool 项目源码 文件源码
def get_signal_distribution(tracks):
  singal = tracks[tracks > 0].ravel()
  count = np.bincount(singal)
  probability = count / float(np.sum(count))

  return stats.rv_discrete(
    a = 0,
    b = np.max(probability.shape[0]),
    name='signal distribution',
    values = (np.arange(count.shape[0]), probability)
  )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号