# ProphetLite
Like Prophet but in numba and all fit with LASSO
## A basic comparison vs Prophet:
```
import pandas as pd
import matplotlib.pyplot as plt
from prophet import Prophet
df = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv')
m = Prophet(weekly_seasonality=False)
m.fit(df, )
future = m.make_future_dataframe(periods=365)
forecast = m.predict(future)
m.plot(forecast)
m.plot_components(forecast)
plt.show()
```
## Now for ProphetLite
You must pass your data as a numpy array
```
y = df['y'].values
```
Now to build the class and pass the seasonality
```
from ProphetLite.prophetlite import ProphetLite
pl = ProphetLite()
fitted = pl.fit(y, [365.25]) #To pass multiple seasonalities just add more nu
predicted = pl.predict(365)
```
Some Plotting helper methods
```
pl.plot()
```
```
pl.plot_components()
```
## Comparison Plots
```
plt.plot(np.append(fitted['yhat'], predicted['yhat']), alpha=.3)
plt.plot(forecast['yhat'], alpha=.3)
plt.show()
```
The Trend Components:
```
plt.plot(np.append(fitted['trend'], predicted['trend']))
plt.plot(forecast['trend'])
plt.show()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/tblume1992/ProphetLite",
"name": "ProphetLite",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "forecasting,time series,seasonality,trend",
"author": "Tyler Blume",
"author_email": "tblume@mail.USF.edu",
"download_url": "",
"platform": null,
"description": "# ProphetLite\n Like Prophet but in numba and all fit with LASSO\n\n## A basic comparison vs Prophet:\n```\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom prophet import Prophet\n\n\ndf = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv')\nm = Prophet(weekly_seasonality=False)\nm.fit(df, )\nfuture = m.make_future_dataframe(periods=365)\nforecast = m.predict(future)\nm.plot(forecast)\nm.plot_components(forecast)\nplt.show()\n```\n## Now for ProphetLite\n You must pass your data as a numpy array\n```\n y = df['y'].values\n```\n Now to build the class and pass the seasonality\n```\nfrom ProphetLite.prophetlite import ProphetLite \n\n\npl = ProphetLite()\nfitted = pl.fit(y, [365.25]) #To pass multiple seasonalities just add more nu\npredicted = pl.predict(365)\n```\n Some Plotting helper methods\n```\n pl.plot()\n```\n```\n pl.plot_components()\n```\n## Comparison Plots\n```\n plt.plot(np.append(fitted['yhat'], predicted['yhat']), alpha=.3)\n plt.plot(forecast['yhat'], alpha=.3)\n plt.show()\n```\nThe Trend Components:\n```\n plt.plot(np.append(fitted['trend'], predicted['trend']))\n plt.plot(forecast['trend'])\n plt.show()\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Like Prophet but using Numba and LASSO.",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/tblume1992/ProphetLite"
},
"split_keywords": [
"forecasting",
"time series",
"seasonality",
"trend"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c00731416c20b92a9524f1bf4d82397d0dd11ed2f528114ff0804cc6fbaf08ff",
"md5": "940e5815e45e022753c5c4891f3528a8",
"sha256": "d6eb63536dd6efaf53be52ad23d4802a0c6c2b6d63a7e504422eb5437be4911d"
},
"downloads": -1,
"filename": "ProphetLite-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "940e5815e45e022753c5c4891f3528a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6531,
"upload_time": "2023-05-29T22:44:29",
"upload_time_iso_8601": "2023-05-29T22:44:29.455025Z",
"url": "https://files.pythonhosted.org/packages/c0/07/31416c20b92a9524f1bf4d82397d0dd11ed2f528114ff0804cc6fbaf08ff/ProphetLite-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-29 22:44:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tblume1992",
"github_project": "ProphetLite",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "prophetlite"
}