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
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:
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)