ML之xgboost:利用xgboost算法(结合sklearn)训练mushroom蘑菇数据集(22+1,6513+1611)来预测蘑菇是否毒性(二分类预测)

 

 

 

 

 

目录

输出结果

设计思路

核心代码


 

 

 

 

 

 

 

输出结果

ML之xgboost:利用xgboost算法(结合sklearn)训练mushroom蘑菇数据集(22+1,6513+1611)来预测蘑菇是否毒性(二分类预测)_人工智能

 

 

设计思路

ML之xgboost:利用xgboost算法(结合sklearn)训练mushroom蘑菇数据集(22+1,6513+1611)来预测蘑菇是否毒性(二分类预测)_ML_02

 

 

核心代码

bst =XGBClassifier(max_depth=3, learning_rate=1, n_estimators=num_round, 
                   silent=True, objective='binary:logistic')

bst.fit(X_train, y_train)

train_preds = bst.predict(X_train)

preds = bst.predict(X_test)

 

 

更多文章请关注《万象专栏》