Skip to content

Instantly share code, notes, and snippets.

@Shikhargupta
Created May 12, 2020 13:30
Show Gist options
  • Select an option

  • Save Shikhargupta/1da18816e609153857a068d2267e9524 to your computer and use it in GitHub Desktop.

Select an option

Save Shikhargupta/1da18816e609153857a068d2267e9524 to your computer and use it in GitHub Desktop.
xg_reg = xgb.XGBRegressor(base_score=0.5, colsample_bylevel=1, colsample_bytree=0.4,
gamma=0, learning_rate=0.07, max_delta_step=0, max_depth=3,
min_child_weight=1.5, missing=None, n_estimators=400, nthread=-1,
objective='reg:linear', reg_alpha=0.75, reg_lambda=0.45,
scale_pos_weight=1, seed=42, silent=True, subsample=0.6)
xg_reg.fit(X_train,np.log(y_train))
x_ax = np.arange(len(xg_reg.feature_importances_))
plt.figure(figsize=(90, 30))
sns.barplot(x=x_ax, y=xg_reg.feature_importances_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment