Skip to content

Make Struct for training parmeters #3

Description

@leofidus

Currently the booster::train method takes a (serde_)json dictionary of parameters. This isn't idiomatic and makes it easier to make mistakes. it would be nicer to be able to write

booster.train(dataset, TrainingParameters { num_iterations: 100, metric: Metric::Huber, learning_rate: 0.2, ...default::Default }

deepsign-training implements a subset of this. There are two challenges:

  • setting something to its default value is not the same as not setting it at all. The most notable examples are parameters that are only valid in combination with other parameters. That means either liberal application of Option<T>, a builder-pattern, or some conversion logic (the route taken by deepsign-training, where parameters are not serialized to json whe they are invalid)
  • There are a lot of parameters: https://lightgbm.readthedocs.io/en/latest/Parameters.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions