facebook / facebook/prophet

Negative coef_lower and coef_upper values for regressor in Prophet

Open
#2,405 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

I am using the Prophet package in R to forecast retail sales using a regressor called Spend, which represents the spend/revenue ratio. I have added the Spend regressor to the model using the add_regressor() function with mode = "additive" and standardize = TRUE.

However, I am getting negative values for the coef_lower and coef_upper parameters of the Spend regressor, which indicates that the model is estimating a negative effect of Spend on retail sales. This is not consistent with my domain knowledge and the observed relationship between Spend and retail sales.

I have tried adjusting the prior.scale parameter of the add_regressor() function to place a stronger prior belief on the Spend coefficient being positive, but this has not resolved the issue.

Is there a way to prevent negative coef_lower and coef_upper values for the Spend regressor in Prophet, or another way to represent Spend so that the model can take it into consideration?

Contributor guide

Open the contributing guide

Research direction

Start with the add_regressor() documentation and the coefficient output containing coef_lower and coef_upper. Investigate whether Prophet documents a supported positivity constraint or an alternative regressor representation; done means the supported behavior and limitation are clearly established with a focused example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, r
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.