microsoft / microsoft/SynapseML

LightGBM doesnt have hyper-parameters as attributes in the java object

Open
#875 2 comments 0 reactions 1 assignee View on GitHub

@imatiach-msft is already working on this.

Since Jun 16, 2020.

area/lightgbm bug
Dominant language
Scala
Stars
5.2k
Forks
868
Avg merge
22h 9m
Merged PRs (30d)
45

Description

Is your feature request related to a problem? Please describe.
Currently it seems the hyper-parameters of LightGBM models do not exist as attributes in the java object.
When I fit a model

lightgbm_classif = LightGBMClassifier(
featuresCol='features', 
isUnbalance=True, 
labelCol='label',  
)
lgbm_model = lightgbm_classif.fit(train_data)

When I retrieve the java obj and try to get learningRate

lgbm_java = lgbm_model._java_obj
lgbm_java.getParam("learningRate")

Got error:
java.util.NoSuchElementException: Param learningRate does not exist.

Describe the solution you'd like
I think it would be helpful to attach the hyper-parameters as attribute to the model object. I think after hyper-parameter tuning we would like to get the best set of hyper-parameters. Currently for LightGBM models, either doing thru the CrossValidator or TuneHyperparameters, I can't extract best set of parameters for LightGBM models.

Additional context
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.