WardBrian / scikit-stan

A sklearn style interface to Stan regression models
https://scikit-stan.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
25 stars 0 forks source link

Algorithm-specific arguments in constructor #4

Closed WardBrian closed 2 years ago

WardBrian commented 2 years ago

It would be nice to expose things like chains, number of iterations, etc, as a dictionary argument or by using **kwargs

alizma commented 2 years ago

This has been completed as of commit 3588a4a. Parameters are passed as a dictionary with fields corresponding to each field the same way that the CmdStanPy algorithm parameters are called. Validation also occurs through the CmdStanPy parameter validation helper methods.

Because the optimization and variational inference choices have several options for algorithms to use, admissible names for that field of the constructor have been changed to sample, optimize, and variational with defaults for each following CmdStanPy.