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
评论列表
文章目录