Skip to content

Instantly share code, notes, and snippets.

@Wann-Jiun
Created January 20, 2017 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wann-Jiun/8daf47909b620a48a5d3cda17462f610 to your computer and use it in GitHub Desktop.
Save Wann-Jiun/8daf47909b620a48a5d3cda17462f610 to your computer and use it in GitHub Desktop.
from xgboost import plot_importance
from matplotlib import pyplot
xgb_regr = xgb.XGBRegressor(
colsample_bytree=0.2,
gamma=0.0,
learning_rate=0.01,
max_depth=4,
min_child_weight=1.5,
n_estimators=7200,
reg_alpha=0.9,
reg_lambda=0.6,
subsample=0.2,
seed=42,
silent=1)
xgb_regr.fit(train_df_munged, label_df)
plot_importance(xgb_regr)
pyplot.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment