Skip to content

Rename cycle parameters from name to params_name #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 5, 2025

Conversation

jessegrabowski
Copy link
Member

This is a small change for consistency with recent changes to the other components. It renames the initial state parameters (the cycle component strengths) from f'{name}' to f'params_{name}'. For example, given:

    cycle = st.CycleComponent(
        name="my_cycle_component",
        cycle_length=12,
        estimate_cycle_length=False,
        innovations=False,
        dampen=True,
        observed_state_names=["data_1", "data_2", "data_3"],
    )

Before:

cycle.param_names 
# ['my_cycle_component']

After:

cycle.params_name
# ['params_my_cycle_component']

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR renames the initial state parameters for the CycleComponent from {name} to params_{name} for consistency with other components in the codebase. The change affects parameter naming in both the component implementation and all associated tests.

Key changes:

  • Updated parameter name generation from f"{self.name}" to f"params_{self.name}"
  • Modified all test cases to use the new parameter naming convention
  • Maintained backward compatibility for all other parameter names (dampening, sigma, etc.)

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
pymc_extras/statespace/models/structural/components/cycle.py Updated parameter name generation and metadata to use params_ prefix
tests/statespace/models/structural/components/test_cycle.py Updated all test cases to use new parameter names in dictionaries
tests/statespace/models/structural/test_against_statsmodels.py Updated statsmodels comparison test to use new parameter naming

Copy link
Contributor

@AlexAndorra AlexAndorra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, thanks @jessegrabowski

@jessegrabowski jessegrabowski merged commit e375978 into pymc-devs:main Aug 5, 2025
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants