Skip to content

Commit e84e82b

Browse files
author
Thomas Bury
committed
fix: remove unnecessary parameter
1 parent 9a36aa7 commit e84e82b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arfs/allrelevant.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,6 @@ def _reduce_vars_lgb_cv(x, y, objective, n_folds, cutoff, n_iter, silent, weight
22882288
if objective == "softmax":
22892289
param = {
22902290
"objective": objective,
2291-
"eval_metric": "mlogloss",
22922291
"num_class": len(np.unique(y)),
22932292
}
22942293
else:
@@ -2311,13 +2310,15 @@ def _reduce_vars_lgb_cv(x, y, objective, n_folds, cutoff, n_iter, silent, weight
23112310
"bagging_freq": "1",
23122311
}
23132312
)
2313+
23142314
clf_losses = ['binary', 'softmax', 'multi_logloss', 'multiclassova', 'multiclass', 'multiclass_ova', 'ova', 'ovr', 'binary_logloss']
23152315
if objective in clf_losses:
23162316
y = y.astype(int)
23172317
y_freq_table = pd.Series(y.fillna(0)).value_counts(normalize=True)
23182318
n_classes = y_freq_table.size
23192319
if n_classes > 2 and objective != "softmax":
23202320
param["objective"] = "softmax"
2321+
param["num_class"] = len(np.unique(y)),
23212322
if not silent:
23222323
print("Multi-class task, setting objective to softmax")
23232324

0 commit comments

Comments
 (0)