From c7c63ff568d617de1a77bb04e9a47dcb51a0ce2d Mon Sep 17 00:00:00 2001 From: "Lawrence A. Krukrubo" <39227472+Lawrence-Krukrubo@users.noreply.github.com> Date: Mon, 17 Aug 2020 22:04:06 +0100 Subject: [PATCH] Style: Adding a method docstring (#1627) Adding a docstring to the `stan_init()` method of `additional_topics.ipynb` notebook --- notebooks/additional_topics.ipynb | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/notebooks/additional_topics.ipynb b/notebooks/additional_topics.ipynb index 3b25fb0..0defa85 100644 --- a/notebooks/additional_topics.ipynb +++ b/notebooks/additional_topics.ipynb @@ -55,6 +55,21 @@ ], "source": [ "def stan_init(m):\n", + " \"\"\"Retrieving parameters from a trained model.\n", + " \n", + " Retrieved parameters from a trained model \n", + " of the Prophet() Class,are used to initialise \n", + " parameters for a new model. This can help \n", + " speed up training, especially if new data\n", + " follows the same trend as the historical data.\n", + " \n", + " @Param\n", + " m: A trained model of the Prophet() Class\n", + " \n", + " @Return\n", + " res: A Dictionary containing retrieved parameters of m\n", + " \n", + " \"\"\"\n", " res = {}\n", " for pname in ['k', 'm', 'sigma_obs']:\n", " res[pname] = m.params[pname][0][0]\n", @@ -84,9 +99,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python (fbprophet)", + "display_name": "Python 3", "language": "python", - "name": "fbprophet" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -98,7 +113,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.0" + "version": "3.8.5" } }, "nbformat": 4,