Multi Prophet is a procedure for forecasting time series data for multipe dependent variables based on Facebook Prophet package. If you have no prior experience with Facebook Prophet, check out their docs.
Multi Prophet does not train a single model with many outputs, it just wraps Facebook Prophet interface to support configuration and controll over multiple models. Multi Prophet has a very similar interface as Facebook Prophet.
The main difference is that return values of each method is a dictionary where each dependent value is a key, and the value is the return value of the linked Facebook Prophet model.
If Prophet return value is a data frame, then MultiProphet return value will be:
python
{"dependent_variable1": df1, "dependent_variable2": df2}
Multi Prophet is on PyPi.
pip install multi-prophet
Creating a basic model is almost the same as creating a Prophet model:
```python
from fbprophet import Prophet
m = Prophet() m.fit(df)
future = m.create_future_dataframe(df) forecast = m.predict(future) m.plot(forecast) ```
```python
from multi_prophet import MultiProphet
m = MultiProphet(columns=["y1", "y2"]) m.fit(df)
future = m.create_future_dataframe(df) forecast = m.predict(future) m.plot(forecast) ```
python
m.add_country_holidays(country_name="US")
```python
m.add_country_holidays("US")
m.add_country_holidays("US", columns=["y1"]) ```
python
m.add_seasonality(name="monthly", period=30.5, fourier_order=5)
```python
m.add_seasonality(name="monthly", period=30.5, fourier_order=5)
m.add_seasonality(name="monthly", period=30.5, fourier_order=5, columns=["y1"]) ```
python
m.add_regressor("Matchday")
```python
m.add_regressor("Matchday")
m.add_regressor("Matchday", columns=["y"]) ```
```python
m.plot(forecast) m.plot_components(forecast)
from fbprophet.plot import plot_plotly, plot_components_plotly import plotly.offline as py py.init_notebook_mode()
fig = plot_plotly(m, forecast) py.iplot(fig)
fig = plot_components_plotly(m, forecast) py.iplot(fig) ```
```python m.plot(forecast) m.plot_components(forecast)
figures = m.plot(forecast, plotly=True) for fig in figures.values(): fig.show()
figures["y1"].show()
figures = m.plot_components(forecast, plotly=True) for fig in figures.values(): fig.show()
figures["y1"].show() ```
Facebook Prophet supports a lot of configuration through kwargs. There are
two ways to do it with Multi Prophet:
1. Through kwargs just as with Facebook Prophet
* Prophet
python
m = Prophet(growth="logistic")
m.fit(self.df, algorithm="Newton")
m.make_future_dataframe(7, freq="H")
m.add_regressor("Matchday", prior_scale=10)
* Multi Prophet
python
m = MultiProphet(columns=["y1", "y2"], growth="logistic")
m.fit(self.df, algorithm="Newton")
m.make_future_dataframe(7, freq="H")
m.add_regressor("Matchday", prior_scale=10)
m = MultiProphet(columns=["y1", "y2"], growth="logistic", weekly_seasonality=True, n_changepoints=50)
config = { "y1": {"growth": "linear", "daily_seasonality": True}, "y2": {"growth": "logistic", "weekly_seasonality": True} } m = MultiProphet(columns=["y1", "y2"], config=config)
regressors = { "y1": [ {"name": "c1", "prior_scale": 0.5}, { "name": "c2", "prior_scale": 0.3} ], "y2": [{"name": "c2", "prior_scale": 0.3}] } m = MultiProphet(columns=["y1", "y2"], regressors=regressors) ```
Bumps pillow from 9.2.0 to 9.3.0.
Sourced from pillow's releases.
9.3.0
https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html
Changes
- Initialize libtiff buffer when saving #6699 [
@radarhere
]- Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [
@wiredfool
]- Inline fname2char to fix memory leak #6329 [
@nulano
]- Fix memory leaks related to text features #6330 [
@nulano
]- Use double quotes for version check on old CPython on Windows #6695 [
@hugovk
]- GHA: replace deprecated set-output command with GITHUB_OUTPUT file #6697 [
@nulano
]- Remove backup implementation of Round for Windows platforms #6693 [
@cgohlke
]- Upload fribidi.dll to GitHub Actions #6532 [
@nulano
]- Fixed set_variation_by_name offset #6445 [
@radarhere
]- Windows build improvements #6562 [
@nulano
]- Fix malloc in _imagingft.c:font_setvaraxes #6690 [
@cgohlke
]- Only use ASCII characters in C source file #6691 [
@cgohlke
]- Release Python GIL when converting images using matrix operations #6418 [
@hmaarrfk
]- Added ExifTags enums #6630 [
@radarhere
]- Do not modify previous frame when calculating delta in PNG #6683 [
@radarhere
]- Added support for reading BMP images with RLE4 compression #6674 [
@npjg
]- Decode JPEG compressed BLP1 data in original mode #6678 [
@radarhere
]- pylint warnings #6659 [
@marksmayo
]- Added GPS TIFF tag info #6661 [
@radarhere
]- Added conversion between RGB/RGBA/RGBX and LAB #6647 [
@radarhere
]- Do not attempt normalization if mode is already normal #6644 [
@radarhere
]- Fixed seeking to an L frame in a GIF #6576 [
@radarhere
]- Consider all frames when selecting mode for PNG save_all #6610 [
@radarhere
]- Don't reassign crc on ChunkStream close #6627 [
@radarhere
]- Raise a warning if NumPy failed to raise an error during conversion #6594 [
@radarhere
]- Only read a maximum of 100 bytes at a time in IMT header #6623 [
@radarhere
]- Show all frames in ImageShow #6611 [
@radarhere
]- Allow FLI palette chunk to not be first #6626 [
@radarhere
]- If first GIF frame has transparency for RGB_ALWAYS loading strategy, use RGBA mode #6592 [
@radarhere
]- Round box position to integer when pasting embedded color #6517 [
@radarhere
]- Removed EXIF prefix when saving WebP #6582 [
@radarhere
]- Pad IM palette to 768 bytes when saving #6579 [
@radarhere
]- Added DDS BC6H reading #6449 [
@ShadelessFox
]- Added support for opening WhiteIsZero 16-bit integer TIFF images #6642 [
@JayWiz
]- Raise an error when allocating translucent color to RGB palette #6654 [
@jsbueno
]- Moved mode check outside of loops #6650 [
@radarhere
]- Added reading of TIFF child images #6569 [
@radarhere
]- Improved ImageOps palette handling #6596 [
@PososikTeam
]- Defer parsing of palette into colors #6567 [
@radarhere
]- Apply transparency to P images in ImageTk.PhotoImage #6559 [
@radarhere
]- Use rounding in ImageOps contain() and pad() #6522 [
@bibinhashley
]- Fixed GIF remapping to palette with duplicate entries #6548 [
@radarhere
]- Allow remap_palette() to return an image with less than 256 palette entries #6543 [
@radarhere
]- Corrected BMP and TGA palette size when saving #6500 [
@radarhere
]
... (truncated)
Sourced from pillow's changelog.
9.3.0 (2022-10-29)
Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [wiredfool]
Initialize libtiff buffer when saving #6699 [radarhere]
Inline fname2char to fix memory leak #6329 [nulano]
Fix memory leaks related to text features #6330 [nulano]
Use double quotes for version check on old CPython on Windows #6695 [hugovk]
Remove backup implementation of Round for Windows platforms #6693 [cgohlke]
Fixed set_variation_by_name offset #6445 [radarhere]
Fix malloc in _imagingft.c:font_setvaraxes #6690 [cgohlke]
Release Python GIL when converting images using matrix operations #6418 [hmaarrfk]
Added ExifTags enums #6630 [radarhere]
Do not modify previous frame when calculating delta in PNG #6683 [radarhere]
Added support for reading BMP images with RLE4 compression #6674 [npjg, radarhere]
Decode JPEG compressed BLP1 data in original mode #6678 [radarhere]
Added GPS TIFF tag info #6661 [radarhere]
Added conversion between RGB/RGBA/RGBX and LAB #6647 [radarhere]
Do not attempt normalization if mode is already normal #6644 [radarhere]
... (truncated)
d594f4c
Update CHANGES.rst [ci skip]909dc64
9.3.0 version bump1a51ce7
Merge pull request #6699 from hugovk/security-libtiff_buffer2444cdd
Merge pull request #6700 from hugovk/security-samples_per_pixel-sec744f455
Added release notes0846bfa
Add to release notes799a6a0
Fix linting00b25fd
Hide UserWarning in logs05b175e
Tighter test case13f2c5a
Prevent DOS with large SAMPLESPERPIXEL in Tiff IFDDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Encountered error while trying to install package: prophet
Supporting new version of Prophet. Relevant docs: https://facebook.github.io/prophet/
Configures and manages multiple Facebook Prophet
models.
Usage for models:
1. configuration
2. creating training and testing data sets
3. adding regressors
4. adding holidays
5. training models
6. making predictions
7. plotting results and components