import xgboost as xgb
xgb.XGBRegressor(max_depth=3, learning_rate=0.1, n_estimators=100, silent=True, objective='reg:linear', nthread=-1, gamma=0, min_child_weight=1, max_delta_step=0, subsample=1, colsample_bytree=1, colsample_bylevel=1, reg_alpha=0, reg_lambda=1, scale_pos_weight=1, base_score=0.5, seed=0, missing=None)
Traceback (most recent call last):
File "
xgb.XGBRegressor(max_depth=3, learning_rate=0.1, n_estimators=100, silent=True, objective='reg:linear', nthread=-1, gamma=0, min_child_weight=1, max_delta_step=0, subsample=1, colsample_bytree=1, colsample_bylevel=1, reg_alpha=0, reg_lambda=1, scale_pos_weight=1, base_score=0.5, seed=0, missing=None)
AttributeError: module 'xgboost' has no attribute 'XGBRegressor'
Python 3.5.2 :: Anaconda 4.2.0 (x86_64)
Hi amitsood,
I had a similar issue but my problem was because i named my python file xgboost.py
Most helpful comment
Hi amitsood,
I had a similar issue but my problem was because i named my python file xgboost.py