kingfengji / gcForest

This is the official implementation for the paper 'Deep forest: Towards an alternative to deep neural networks'
http://lamda.nju.edu.cn/code_gcForest.ashx
1.31k stars 429 forks source link

use 2-D numpy array data, encounter error #42

Open ssdyue opened 6 years ago

ssdyue commented 6 years ago

error: xgboost.core.XGBoostError: value 0 for Parameter num_class should be greater equal to 1

i7p9h9 commented 6 years ago

The XGBClassifier does set the value num_class automatically if you use its fit method/ You can fix it next: ca_config["estimators"].append( {"n_folds": 5, "type": "XGBClassifier", "n_estimators": 10, "max_depth": 5, "objective": "multi:softprob", "silent": True, "nthread": -1, "learning_rate": 0.1, "num_class": num_clases} )