Hi there,
I’m new in WB and I’like to know if it is possible to assign customs names in Sweep features importance table display.
Here some of my code:
def train():
with wandb.init(job_type="sweep") as run:
bst_params = {
'gamma': run.config['gamma']
, 'learning_rate': run.config['learning_rate']
, 'max_depth': run.config['max_depth']
, 'min_child_weight': run.config['min_child_weight']
.....
}
# Initialize the XGBoostClassifier with the WandbCallback
clf= XGBClassifier(error_score='raise',
gpu_id=GPU_ID,
#eval_metric=eval_metric,
**bst_params,
callbacks=[WandbCallback()],
early_stopping_rounds=run.config['early_stopping_rounds'])
# Train the model
clf.fit(eval_set[0][0],
eval_set[0][1],
**{'eval_set':[eval_set[1]],
'verbose':False,
...})
bstr = clf.get_booster()
#Set features names
bstr.feature_names = cols_name
# Log booster metrics
run.summary["best_ntree_limit"] = bstr.best_ntree_limit
# Get train and validation predictions
trnYpreds = clf.predict_proba(eval_set[0][0])[:,1]
valYpreds = clf.predict_proba(eval_set[1][0])[:,1]
# Log additional Validation metrics
ks_stat, ks_pval = ks_2samp(valYpreds[eval_set[1][1]==1], valYpreds[eval_set[1][1]==0])
run.summary["val_ks_2samp"] = ks_stat
run.summary["val_ks_pval"] = ks_pval
run.summary["val_auc"] = metrics.roc_auc_score(eval_set[1][1], valYpreds)
...
This is the features importance output:
When I look at the Sweep features importance report I see features names as ‘f0’,…‘fn’.
I suppose that this report refers to model features importance and my question is: is it possible to assign custom names to the features ? How to do that?
Many thanks, Fabio