Interaction constraint


#1

Hi,

I tried testing interaction constraint feature from command line arguments.

added below args to the basic args -
split_evaluator=“interaction”
interaction_constraints= ‘[[2,3,4],[6,7,8]]’

But got runtime error “InteractionConstraint must be given an inner evaluator”

Please guide me, what is inner evaluator I should provide for executing interaction constraint feature.

I have used basic args as following:

$XGBOOSTCODE/xgboost
$XGBOOSTCODE/xgb.conf
booster=gbtree task=train
train_path=input.libsvm
fmap=attr.fmap
nthread=50 num_round=5 max_depth=3 learning_rate=0.1 min_child_weight=20
reg_lambda=0 min_split_loss=0 objective=binary:logistic
model_out=intercation.model
tree_method=exact
save_period=0
predictor=cpu_predictor


#2

Please remove split_evaluator from your CLI configuration, since the interaction constraints are enabled by default:


#3

I tried removing split_evaluator and built model.
I found that the model built with interaction constraint and without interaction constraint, both are exactly same.

It looks like the constraint is not enforced while given parameter as interaction_constraints= ‘[[2,3,4],[6,7,8]]’ in command line.

Let me know if I am missing anything here.
Thanks for your response.


#4

I don’t think we actually tested interaction constraints for CLI. Try using Python?


#5

I tried testing with python api and it is working as expected.

Thanks a lot for your response.
I will check the command-line and try to fix it.