I try to update my classifier function with for loop, but ".i" could not be applied.
clf = XGBClassifier(base_score=None, booster=None, colsample_bylevel=None,
colsample_bynode=None, colsample_bytree=0.5, gamma=0.1,
gpu_id=None, importance_type='gain', interaction_constraints=None,
learning_rate=101, max_delta_step=None, max_depth=2,
min_child_weight=3, missing=nan, monotone_constraints=None,
n_estimators=100, n_jobs=None, num_parallel_tree=None,
objective='binary:logistic', random_state=None, reg_alpha=None,
reg_lambda=None, scale_pos_weight=None, subsample=None,
tree_method=None, validate_parameters=False, verbosity=None)
d = {'learning_rate': [0.2], 'colsample_bytree': [0.5],'gamma' : [0.3] }
m = pd.DataFrame(data=d)
parameters = ['learning_rate', 'colsample_bytree', 'gamma']
for i in parameters:
clf.i = m[i][0]
My expectation: Switch of parameters with new values.