felipeangelimvieira / prophetverse

A multiverse of Prophet models for timeseries
https://prophetverse.com
Apache License 2.0
31 stars 3 forks source link

[ENH] Refactor BaseBayesianForecaster #91

Closed felipeffm closed 2 months ago

felipeffm commented 2 months ago

Description:

The BaseBayesianForecaster class currently has several responsibilities beyond forecasting using Bayesian inference. These responsibilities include:

Plotting
Selecting an optimizer
Managing exogenous effects
Scaling

It would improve maintainability and documentation if these responsibilities were separated into distinct components. This refactor would allow each component to focus on a single responsibility, making the codebase cleaner and easier to understand.

Proposal:

Create separate classes or modules for:
    Plotting
    Optimizer selection
    Exogenous effects management
    Scaling

Refactor the BaseBayesianForecaster class to utilize these new components, ensuring that it focuses solely on the Bayesian forecasting logic.

Update the documentation to reflect the new structure, providing clear guidelines on how to use and extend each component.

Write unit tests for each new component to ensure they work correctly both in isolation and when integrated with the BaseBayesianForecaster.

Benefits:

Improved code readability and maintainability
Easier to document and understand each component's functionality
Enhanced ability to test individual components independently
Facilitates future enhancements and modifications

Additional Information: If there are any specific considerations or constraints that need to be taken into account during this refactor, please share them in the comments.