如果您看到这篇文章,表示您的 blog 已经安装成功.

代码测试

# -*- coding:utf-8 -*-
import xgboost as xgb
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.datasets.svmlight_format import load_svmlight_file
from sklearn.ensemble.gradient_boosting import GradientBoostingClassifier
from sklearn.linear_model.logistic import LogisticRegression
from sklearn.metrics.ranking import roc_auc_score
from sklearn.preprocessing.data import OneHotEncoder
from scipy.sparse.construct import hstack