unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
7.89k stars 854 forks source link

Unified API : `model.params` attribute #192

Open norihitoishida opened 3 years ago

norihitoishida commented 3 years ago

Hello! Firstly, I wanted to thank you for this wonderful library.

Unified API to get model's params might make darts more convenient. For example, to get params of Exponential Smoothing model, We have to code like this:

model = ExponentialSmoothing()
model.fit(train)

print(model.model.model.params) # {'smoothing_level': 0.5789473661331209, 'smoothing_slope': ...

So, I want to implement model.get_params() method like sklearn. model.params attribute with property like statsmodels and fbprophet.

I would like to get your opinion before send PR. Thanks!

LeoTafti commented 3 years ago

Hello @norihitoishida, thanks for your suggestion and offering to help! I think that would be a nice addition to our library.

Make sure to check out our guidelines first and to include a couple unit tests. Thanks!

norihitoishida commented 3 years ago

Thanks @LeoTafti !

hrzn commented 3 years ago

+1 for that, it's a good idea

norihitoishida commented 3 years ago

Related to #195 , Unittest fails in my development environment. So I will prioritize resolving #195 . This shouldn't be a problem on the develop branch.

norihitoishida commented 3 years ago

I found it more intuitive to use the model.params attribute instead of the model.get_params() method (following the fbprophet and statsmodels).

norihitoishida commented 3 years ago

Sorry, due to my personal health issues, I have found that it will take some time to complete this task. Let me close this once.

hrzn commented 3 years ago

Take care @norihitoishida

norihitoishida commented 3 years ago

Thank you for your kindness : )