Skip to content

feat(Prophet-coeffs): DS-2469 store prophet coeffs 2#24

Open
Eliel-Avilez wants to merge 1 commit intomainfrom
feat/store-prophet-coeffs-2
Open

feat(Prophet-coeffs): DS-2469 store prophet coeffs 2#24
Eliel-Avilez wants to merge 1 commit intomainfrom
feat/store-prophet-coeffs-2

Conversation

@Eliel-Avilez
Copy link
Copy Markdown
Collaborator

@Eliel-Avilez Eliel-Avilez commented Apr 3, 2026

Please refer to this Robyn 2 PR which is part 1 of this development.

  • Quick Recap of the above mentioned PR: A new output file for Robyn was added, called prophet_regressor_coefficients.csv which stores the Prophet regressors and the coefficients of the factor variables, example:
  regressor coefficient
1 Marathons_0 -0.014
2 Marathons_1 0.006
1 RandomVariable_X -0.003
2 RandomVariable_Y 0.006

Changes

  • Added the columns factor_var, and level to the output file. We could encounter scenarios where some factor name is contained within other factor name. This two new columns will give us clarity of the name and the values of the variable instead, so we assume as little as possible, example:
  factor_var level regressor coefficient
1 events black_friday events_black_friday -0.014
2 events spring_break events_spring_break 0
1 events_legacy independence_day events_legacy_independence_day 0
2 events_legacy memorial_day events_legacy_memorial_day 0.006
  • Changed the way we get the present regressors that Prophet estimated when adding the reference levels. (inputs.R/add_reference_levels_to_prophet_coefficients()).

    • Before: Concatenating factor var names and levels to form present regressors names for each factor.
    • After: We get the present regressors for each factor by checking the existence of the general present regressors list in the list of OHE columns formed for a specific factor.

    With this, we avoid the possibility of wrongly assigned levels for each factor if factor names are alike, e.g. events: black_friday, spring_break, independence_day, memorial_day.

@GG-TechOpsSuper
Copy link
Copy Markdown

GG-TechOpsSuper commented Apr 3, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Eliel-Avilez Eliel-Avilez changed the title feat(store-prophet-coeffs): DS-2469 store prophet coeffs 2 feat(Prophet-coeffs): DS-2469 store prophet coeffs 2 Apr 3, 2026
@Eliel-Avilez Eliel-Avilez marked this pull request as ready for review April 6, 2026 23:48
@Eliel-Avilez Eliel-Avilez self-assigned this Apr 6, 2026
@Eliel-Avilez Eliel-Avilez added the feature New feature or request label Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants