赞
踩
import numpy as np import pandas as pd import xgboost as xgb from sklearn.cross_validation import train_test_split import os import csv #from xgboost.sklearn import XGBClassifier #from sklearn import cross_validation, metrics #Additional scklearn functions #from sklearn.grid_search import GridSearchCV #Perforing grid search # #import matplotlib.pylab as plt #from matplotlib.pylab import rcParams #记录程序运行时间 import time start_time = time.time() #读入数据 current_dir = os.path.abspath('.') train = pd.read_csv("train_data.csv") tests = pd.read_csv("test_data.csv") params={ 'booster':'gbtree', 'objective': 'reg:linear', #多分类的问题 'gamma':0.1, # 用于控制是否后剪枝的参数,
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。