data_converter.py 文件源码

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

项目:AutoML5 作者: djajetic 项目源码 文件源码
def convert_to_num(Ybin, verbose=True):
    ''' Convert binary targets to numeric vector (typically classification target values)'''
    if verbose: print("\tConverting to numeric vector")
    Ybin = np.array(Ybin)
    if len(Ybin.shape) ==1:
         return Ybin
    classid=range(Ybin.shape[1])
    Ycont = np.dot(Ybin, classid)
    if verbose: print Ycont
    return Ycont
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号