Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add metric parameter to lightgbm learners #672

Merged
merged 1 commit into from
Aug 27, 2019

Conversation

imatiach-msft
Copy link
Contributor

resolves #631 and #628

@imatiach-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov
Copy link

codecov bot commented Aug 27, 2019

Codecov Report

Merging #672 into master will decrease coverage by 0.17%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #672      +/-   ##
==========================================
- Coverage    79.9%   79.72%   -0.18%     
==========================================
  Files         225      225              
  Lines        9033     9037       +4     
  Branches      483      484       +1     
==========================================
- Hits         7218     7205      -13     
- Misses       1815     1832      +17
Impacted Files Coverage Δ
.../com/microsoft/ml/spark/lightgbm/TrainParams.scala 100% <100%> (ø) ⬆️
...m/microsoft/ml/spark/lightgbm/LightGBMParams.scala 85.71% <100%> (+0.62%) ⬆️
...m/microsoft/ml/spark/lightgbm/LightGBMRanker.scala 56.09% <100%> (ø) ⬆️
...icrosoft/ml/spark/lightgbm/LightGBMRegressor.scala 66.66% <100%> (ø) ⬆️
...crosoft/ml/spark/lightgbm/LightGBMClassifier.scala 86.74% <100%> (-1.35%) ⬇️
...a/com/microsoft/ml/spark/io/http/HTTPClients.scala 54.71% <0%> (-16.99%) ⬇️
...a/com/microsoft/ml/spark/lightgbm/TrainUtils.scala 87.94% <0%> (-2.24%) ⬇️
...osoft/ml/spark/io/http/PartitionConsolidator.scala 93.33% <0%> (-2.23%) ⬇️
...om/microsoft/ml/spark/lightgbm/LightGBMUtils.scala 95.29% <0%> (-1.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9805996...792fc34. Read the comment docs.

mhamilton723
mhamilton723 previously approved these changes Aug 27, 2019
Copy link
Collaborator

@mhamilton723 mhamilton723 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing

@imatiach-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@imatiach-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@imatiach-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@imatiach-msft
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mhamilton723 mhamilton723 changed the title add metric parameter to lightgbm learners feat: add metric parameter to lightgbm learners Aug 27, 2019
@mhamilton723 mhamilton723 merged commit 8b27d88 into microsoft:master Aug 27, 2019
@candalfigomoro
Copy link

@imatiach-msft
Does it support multiple evaluation metrics (just like LightGBM)?

@imatiach-msft
Copy link
Contributor Author

@candalfigomoro yes it should, with comma separated metrics. For early stopping we also use all metrics specified (note early stopping is not provided in native api so R/python and our spark implementation all have their own implementation):
https://github.com/Azure/mmlspark/blob/master/src/main/scala/com/microsoft/ml/spark/lightgbm/TrainUtils.scala#L211

@dr-drunkensteinn
Copy link

@imatiach-msft
Does it support just ndcg or ndcg@N as well ?

@imatiach-msft
Copy link
Contributor Author

@nishant-ai I think it should support all lightgbm metrics as specified here:
https://github.com/microsoft/LightGBM/blob/master/docs/Parameters.rst#metric
but for NDCG@N I believe we need to expose the parameter eval_at based on a quick look through the lightgbm docs:
https://github.com/microsoft/LightGBM/blob/master/docs/Parameters.rst#eval_at
specifically for early stopping, the scala version of lightgbm does use the correct comparison function here:
https://github.com/Azure/mmlspark/blob/master/src/main/scala/com/microsoft/ml/spark/lightgbm/TrainUtils.scala#L215

@dr-drunkensteinn
Copy link

Yes, I meant the eval_at parameter only. I had a look at the code and the eval_at parameter used for @n metrics didn't seem to be exposed, just wanted to confirm that.
Can you please make the changes needed so that NDCG@N can be used as well ? Thanks.

@dr-drunkensteinn
Copy link

Thanks @imatiach-msft !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to set Evaluation metric while using LightGBMRegressor in Scala-Spark [High Priority]
4 participants