predict.py 文件源码

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

项目:Black-Swan 作者: 12190143 项目源码 文件源码
def predict(x_file, y_file, test_x_file, best_params):
    X1 = np.loadtxt(x_file, delimiter=",")
    Y1 = np.loadtxt(y_file, delimiter=",")
    test_X1 = np.loadtxt(test_x_file, delimiter=",")
    EXT1 = ExtraTreesRegressor(n_jobs=-1, random_state=1, **best_params)
    EXT1.fit(X1, Y1)
    test_Y1 = EXT1.predict(test_X1)  # * NOR.scale_ + NOR.mean_
    # print test_Y1
    # print EXT1.feature_importances_
    return test_Y1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号