Skip to content

Conversation

@ryanbieber
Copy link
Owner

This pull request introduces several enhancements and clarifications to the Farseer repository, with a focus on improving support and documentation for conditional seasonalities, floor parameters, and model serialization. The changes span user-facing documentation, Python and Rust APIs, and internal data structures, ensuring consistency and feature completeness across the stack.

Key highlights:

  • The documentation for contributors is significantly expanded, providing clear guidance on conventions, scaling, regressors, floor handling, conditional seasonalities, model serialization, and testing.
  • Conditional seasonalities are now fully supported and documented, with corresponding changes in both Python and Rust APIs.
  • Internal data structures are updated to support floor and condition columns, aligning with Prophet compatibility.
  • Model serialization and deserialization are clarified, with explicit notes about limitations due to PyO3.
  • Minor improvements to pre-commit configuration and test coverage for new/changed parameters.

Documentation and Contributor Guidance

  • Major expansion of .github/copilot-instructions.md to detail repository conventions, scaling logic, regressor standardization, floor parameter handling, conditional seasonalities, model estimation, serialization limitations, and testing practices. This provides a comprehensive reference for contributors and automated coding assistants.

Conditional Seasonality Support

  • Python API (farseer/__init__.py): Added a condition_name parameter to add_seasonality, with updated docstrings and method signature to allow specifying conditional seasonalities. [1] [2]
  • Rust core (src/core/model.rs, src/core/data.rs):
    • SeasonalityConfig struct now includes an optional condition_name field, with builder method with_condition. [1] [2] [3]
    • TimeSeriesData struct now includes a conditions field and methods for adding condition columns, supporting boolean masks for conditional seasonalities. [1] [2] [3]

Floor Parameter and Data Structure Enhancements

  • TimeSeriesData struct now includes an optional floor field and a with_floor method, supporting logistic growth with saturating minimum and aligning with Prophet's behavior. [1] [2]

Model Serialization and Deserialization

  • Python API: Added from_json class method to Farseer for deserializing models from JSON strings, with explicit documentation of the PyO3 limitation (loaded models require pandas DataFrames for prediction).

Testing and Pre-commit Improvements

  • Rust integration tests updated to use the new add_seasonality signature with condition_name parameter, ensuring test coverage for additive/multiplicative/conditional seasonalities. [1] [2] [3] [4] [5] [6]
  • Pre-commit configuration: Ruff linter and formatter are now excluded from running on .ipynb files, reducing noise in notebook-based workflows.

John Doe added 2 commits October 22, 2025 04:43
- Removed thread count and grainsize calculations from Stan model implementation in `stan.rs`.
- Updated optimization call to use a single thread.
- Deleted the `README.md` file for the Stan binaries directory as it is no longer needed.
- Simplified the Stan model (`prophet.stan`) by removing the `reduce_sum` functionality and related weight handling.
- Optimized likelihood calculations for weighted observations and removed unnecessary components.
- Updated the binary `prophet_model` to reflect changes in the Stan model.
@ryanbieber ryanbieber merged commit 937ff44 into master Oct 22, 2025
2 checks passed
@ryanbieber ryanbieber deleted the carnufex/some_more branch October 22, 2025 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants