Style: Adding a method docstring (#1627)

Adding a docstring to the `stan_init()` method of
`additional_topics.ipynb` notebook
This commit is contained in:
Lawrence A. Krukrubo 2020-08-17 22:04:06 +01:00 committed by GitHub
parent 75ec9dffb1
commit c7c63ff568
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,