Commit 01c7b97d authored by Tsukasa OMOTO's avatar Tsukasa OMOTO Committed by Guolin Ke
Browse files

python-package: fix eval_at (#639)

eval_at has been broken after e465f92a.
This commit will fix eval_at.
parent 31302bf7
......@@ -340,6 +340,8 @@ class LGBMModel(LGBMModelBase):
params.pop('n_estimators', None)
if hasattr(self, 'n_classes_') and self.n_classes_ > 2:
params['num_class'] = self.n_classes_
if hasattr(self, 'eval_at'):
params['ndcg_eval_at'] = self.eval_at
if self.fobj:
params['objective'] = 'None' # objective = nullptr for unknown objective
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment