Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srj101/future_prediction_facebook_prophet
https://github.com/srj101/future_prediction_facebook_prophet
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/srj101/future_prediction_facebook_prophet
- Owner: srj101
- Created: 2023-07-16T10:12:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-16T10:19:20.000Z (over 1 year ago)
- Last Synced: 2024-06-03T02:41:49.821Z (7 months ago)
- Language: Jupyter Notebook
- Size: 2.95 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# future_prediction_facebook_prophet
steps to use Prophet and output them in markdown:
Import the necessary libraries and modules:
# Python
import pandas as pd
from prophet import Prophet
Read the data into a pandas DataFrame:
# Python
df = pd.read_csv('example.csv')
Instantiate a Prophet object:
# Python
m = Prophet()
Fit the model with the historical data:
# Python
m.fit(df)
Create a future DataFrame for making predictions:
# Python
future = m.make_future_dataframe(periods=365)
Make predictions using the Prophet model:
# Python
forecast = m.predict(future)
Plot the forecast:
# Python
fig1 = m.plot(forecast)
Plot the forecast components:
# Python
fig2 = m.plot_components(forecast)
Find more details and options in the Prophet documentation.