"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "notebooks/trend_changepoints.ipynb" between
prophet-1.1.tar.gz and prophet-1.1.1.tar.gz

About: Prophet is a tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.

trend_changepoints.ipynb  (prophet-1.1):trend_changepoints.ipynb  (prophet-1.1.1)
skipping to change at line 13 skipping to change at line 13
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": 1,
"metadata": { "metadata": {
"block_hidden": true "block_hidden": true
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"%load_ext rpy2.ipython\n", "%load_ext rpy2.ipython\n",
"%matplotlib inline\n", "%matplotlib inline\n",
"\n",
"from prophet import Prophet\n", "from prophet import Prophet\n",
"import pandas as pd\n",
"from matplotlib import pyplot as plt\n", "from matplotlib import pyplot as plt\n",
"import pandas as pd\n",
"import numpy as np\n", "import numpy as np\n",
"import logging\n", "import logging\n",
"import warnings\n",
"\n",
"logging.getLogger('prophet').setLevel(logging.ERROR)\n", "logging.getLogger('prophet').setLevel(logging.ERROR)\n",
"logging.getLogger('numexpr').setLevel(logging.ERROR)\n", "logging.getLogger('numexpr').setLevel(logging.ERROR)\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")\n", "warnings.filterwarnings(\"ignore\")\n",
"df = pd.read_csv('../examples/example_wp_log_peyton_manning.csv')" "\n",
"df = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/e
xamples/example_wp_log_peyton_manning.csv')"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 2,
"metadata": { "metadata": {
"block_hidden": true "block_hidden": true
}, },
"outputs": [ "outputs": [
{ {
skipping to change at line 50 skipping to change at line 53
"R[write to console]: Disabling daily seasonality. Run prophet with daily. seasonality=TRUE to override this.\n", "R[write to console]: Disabling daily seasonality. Run prophet with daily. seasonality=TRUE to override this.\n",
"\n", "\n",
"R[write to console]: Disabling daily seasonality. Run prophet with daily. seasonality=TRUE to override this.\n", "R[write to console]: Disabling daily seasonality. Run prophet with daily. seasonality=TRUE to override this.\n",
"\n" "\n"
] ]
} }
], ],
"source": [ "source": [
"%%R\n", "%%R\n",
"library(prophet)\n", "library(prophet)\n",
"df <- read.csv('../examples/example_wp_log_peyton_manning.csv')\n", "df <- read.csv('https://raw.githubusercontent.com/facebook/prophet/main/exa mples/example_wp_log_peyton_manning.csv')\n",
"m <- prophet(df)\n", "m <- prophet(df)\n",
"future <- make_future_dataframe(m, periods=366)\n", "future <- make_future_dataframe(m, periods=366)\n",
"m <- prophet(df)\n", "m <- prophet(df)\n",
"forecast <- predict(m, future)" "forecast <- predict(m, future)"
] ]
}, },
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
skipping to change at line 387 skipping to change at line 390
], ],
"source": [ "source": [
"m = Prophet(changepoints=['2014-01-01'])\n", "m = Prophet(changepoints=['2014-01-01'])\n",
"forecast = m.fit(df).predict(future)\n", "forecast = m.fit(df).predict(future)\n",
"fig = m.plot(forecast)" "fig = m.plot(forecast)"
] ]
} }
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },
"language_info": { "language_info": {
"codemirror_mode": { "codemirror_mode": {
"name": "ipython", "name": "ipython",
"version": 3 "version": 3
}, },
"file_extension": ".py", "file_extension": ".py",
"mimetype": "text/x-python", "mimetype": "text/x-python",
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.8.3" "version": "3.8.10"
} }
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 1 "nbformat_minor": 4
} }
 End of changes. 10 change blocks. 
7 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)