Is it possible to predict data with 11 months cycle?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- data, machine-learning
Research direction
Start with the supplied Python example and attached 11month_span.csv, then inspect Prophet's add_seasonality() and make_future_dataframe() behavior for the 11-month pattern. Define the requested behavior and completion criteria around automatically identifying the cycle and producing a forecast that follows the demonstrated shifting peaks without manually setting the period.
Written by the indexing model from the issue text.
Description
I have a monthly data with 11months cycle like below.
The peak appears every 11 months and shifts by one month each year.
(the data is very simplified for explanation)
I tried to predict it with Prophet but the result was incorrect.
I also tried with 12 months cycle data and the result was correct.
Prophet analyzes seasonality on a weekly or yearly basis. So it seems that data with cycles that are not divisors of 12 (11 months, 24 months, etc.) cannot be predicted correctly.
It seems that manually set cycle to add_seasonality() will solve the problem, but the cycle depends on the dataset so it need to automatically analyze the cycle from the data.
Sample data and code
import pandas as pd
import matplotlib.pyplot as plt
from prophet import Prophet
df = pd.read_csv("11month_span.csv")
df["date"] = pd.to_datetime(df["date"])
df.columns = ["ds", "y"]
train_data = df[df.ds < "2024-1"]
model = Prophet()
model.fit(train_data)
future = model.make_future_dataframe(periods=12, freq="MS")
pred = model.predict(future)
model.plot(pred, include_legend=True)
plt.savefig("test.png")
- Dominant language
- Python
- Stars
- 20.5k
- Forks
- 4.6k
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from facebook/prophet
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Linux x86-64 wheel: overlapping ELF load pages in prophet_model.bin on Linux 4.18 kernelsPossibly taken @nicolasdalsass claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
make_future_dataframe returns 1970 dates when `ds` is an integer columnPossibly taken @k0nnect claimed this 10 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
model_to_json drops the fitted regressor predictor; deserialized model can't predictPossibly taken @caiotheodoro claimed this 11 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
plot_components fails for logistic models with minmax scaling and no floorPossibly taken @RaphaelFakhri claimed this 38 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
All issues in facebook/prophet
Similar issues
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
type/bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
h2oai/h2o-llmstudio#1163 ·
Maintainers usually reply within 1 day