나는 scikit-learn을 사용하여 XGBoost 모델을 구축했으며 매우 만족합니다. 오버 피팅 (overfitting)을 피하기 위해 미세 튜닝을 해보고 싶습니다. 일부 기능의 단조 로움을 보장하기 위해 일부 어려움에 직면하기 시작합니다 ...ScikitLearn을 사용하여 XGBoost에서 단조로운 구속 조건을 적용하는 방법은 무엇입니까?
scikit에는 xgboost에 대한 설명서가 없습니다. 이 상황이 몇 달 동안 계속된다는 것을 알면 정말 놀랐습니다.) 내가 찾은 유일한 문서는 바로 위에 있습니다 http://xgboost.readthedocs.io
이 웹 사이트에서는 "monotone_constraints"옵션을 사용하여 단조 로움을 적용 할 수 있음을 알았습니다. 나는 Scikit이-알아에서 사용하려고 노력하지만 오류 메시지 "형식 오류 : 초기화()를 가지고 예기치 않은 키워드 인수 'monotone_constraints'"가지고
당신이 그것을 할 수있는 방법을 알고 계십니까?
grid = {'learning_rate' : 0.01, 'subsample' : 0.5, 'colsample_bytree' : 0.5,
'max_depth' : 6, 'min_child_weight' : 10, 'gamma' : 1,
'monotone_constraints' : monotonic_indexes}
#'monotone_constraints' ~ = "(1,-1)"
m07_xgm06 = xgb.XGBClassifier(n_estimators=2000, **grid)
m07_xgm06.fit(X_train_v01_oe, Label_train, early_stopping_rounds=10, eval_metric="logloss",
eval_set=[(X_test1_v01_oe, Label_test1)])
단조 로움 제약이 지금은 효과가없는 것처럼 보입니다. 나는 이것 [여기] (https://github.com/dmlc/xgboost/issues/1514#issuecomment-307567705)에 대해 질문했다. @chapelon이 당신에게 효과가 있습니까? –