Kregnach
Kregnach

Reputation: 215

xgboost properties are not working after being installed properly

I've tried to install xgboost via pip, but due to some problem with the egg file, error occured. Then i tried the following:

git clone --recursive https://github.com/dmlc/xgboost cd xgboost; make -j4

It was working well. Now pip says xgboost and sklearn is installed properly. However i encounter some problems when i try to repeat some basic code from different xgboost examples ( like : https://machinelearningmastery.com/develop-first-xgboost-model-python-scikit-learn/ or several other webpages)

works fine (just gives back DepreciationWarning), but several attributes are not working, like:

booster = xgb.Booster()

gives back:

AttributeError: module 'xgboost' has no attribute 'Booster'

and model = XGBClassifier() comes with:

NameError: name 'XGBClassifier' is not defined

Do anyone has any idea what could be my mistake?

Upvotes: 1

Views: 3644

Answers (1)

sn3fru
sn3fru

Reputation: 106

You are probably using the wrong version. version 0.6.x contains the booster function but the latter (0.7.x) does not contain them anymore. It is possible to do everything from before but accessing different functions ...

Upvotes: 1

Related Questions