grantjenks / python-runstats

Python module for computing statistics and regression in a single pass.
http://grantjenks.com/docs/runstats/
Other
96 stars 19 forks source link

Allow setting and getting internal state #6

Closed FlorianWilhelm closed 7 years ago

FlorianWilhelm commented 7 years ago

Getting and setting the internal state of the Statistics and Regression object in order to resolve issue #4. I renamed the methods to get_state and set_state instead of get_params and set_params because we are saving the internal state while in Scikit-Learn the parameters are really the initialization parameters. As shown in the unit tests those methods allow storing the current state of the aforementioned objects for later usage. Some minor PEP8 related changes were also done.

grantjenks commented 7 years ago

Deployed at 1.1.0.

grantjenks commented 7 years ago

I changed the internal state in v1.2.0. It now returns a tuple rather than a dictionary. This was useful for implementing hashing.