amazon_main_logit_3way_best.py 文件源码

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

项目:ensemble_amazon 作者: kaz-Anova 项目源码 文件源码
def load_data(filename, use_labels=True):
    """
    Load data from CSV files and return them as numpy arrays
    The use_labels parameter indicates whether one should
    read the first column (containing class labels). If false,
    return all 0s. 
    """

    # load column 1 to 8 (ignore last one)
    data = np.loadtxt(open( filename), delimiter=',',
                      usecols=range(1, 9), skiprows=1)
    if use_labels:
        labels = np.loadtxt(open( filename), delimiter=',',
                            usecols=[0], skiprows=1)
    else:
        labels = np.zeros(data.shape[0])
    return labels, data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号