From 03d3ec9f2edd2f246ad2c072188150320bbc58ce Mon Sep 17 00:00:00 2001 From: bl Date: Tue, 4 Jul 2017 08:39:49 -0700 Subject: [PATCH] Fix notebook Makefile and various typos --- docs/Makefile | 4 ++-- docs/_docs/quick_start.md | 2 +- docs/_docs/trend_changepoints.md | 2 +- notebooks/quick_start.ipynb | 2 +- notebooks/trend_changepoints.ipynb | 2 +- python/fbprophet/forecaster.py | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 1185ae4..2d46f47 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,7 +3,7 @@ notebooks: do \ NAME=$$(basename $$f .ipynb); \ jupyter nbconvert --to markdown ../notebooks/$$NAME.ipynb --template=nbconvert_template.tpl; \ - mv -f "$$NAME".md _docs/; \ + mv -f ../notebooks/"$$NAME".md _docs/; \ rm -rf static/"$$NAME"_files; \ - mv "$$NAME"_files static/; \ + mv ../notebooks/"$$NAME"_files static/; \ done diff --git a/docs/_docs/quick_start.md b/docs/_docs/quick_start.md index c817142..6b79698 100644 --- a/docs/_docs/quick_start.md +++ b/docs/_docs/quick_start.md @@ -70,7 +70,7 @@ df.head() -We fit the model by instantiated a new `Prophet` object. Any settings to the forecasting procedure are passed into the constructor. Then you call its `fit` method and pass in the historical dataframe. Fitting should take 1-5 seconds. +We fit the model by instantiating a new `Prophet` object. Any settings to the forecasting procedure are passed into the constructor. Then you call its `fit` method and pass in the historical dataframe. Fitting should take 1-5 seconds. ```python # Python diff --git a/docs/_docs/trend_changepoints.md b/docs/_docs/trend_changepoints.md index d46bd86..ecbead7 100644 --- a/docs/_docs/trend_changepoints.md +++ b/docs/_docs/trend_changepoints.md @@ -22,7 +22,7 @@ Even though we have a lot of places where the rate can possibly change, because The number of potential changepoints can be set using the argument `n_changepoints`, but this is better tuned by adjusting the regularization. ### Adjusting trend flexibility -If the trend changes are being overfit (too much flexibility) or underfit (not enough flexiblity), you can adjust the strength of the sparse prior using the input argument `changepoint_prior_scale`. By default, this parameter is set to 0.05. Increasing it will make the trend *more* flexibile: +If the trend changes are being overfit (too much flexibility) or underfit (not enough flexibility), you can adjust the strength of the sparse prior using the input argument `changepoint_prior_scale`. By default, this parameter is set to 0.05. Increasing it will make the trend *more* flexible: ```R # R diff --git a/notebooks/quick_start.ipynb b/notebooks/quick_start.ipynb index 064bb9b..7db8ebb 100644 --- a/notebooks/quick_start.ipynb +++ b/notebooks/quick_start.ipynb @@ -119,7 +119,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We fit the model by instantiated a new `Prophet` object. Any settings to the forecasting procedure are passed into the constructor. Then you call its `fit` method and pass in the historical dataframe. Fitting should take 1-5 seconds." + "We fit the model by instantiating a new `Prophet` object. Any settings to the forecasting procedure are passed into the constructor. Then you call its `fit` method and pass in the historical dataframe. Fitting should take 1-5 seconds." ] }, { diff --git a/notebooks/trend_changepoints.ipynb b/notebooks/trend_changepoints.ipynb index cdea09a..bc2dbf4 100644 --- a/notebooks/trend_changepoints.ipynb +++ b/notebooks/trend_changepoints.ipynb @@ -161,7 +161,7 @@ "metadata": {}, "source": [ "### Adjusting trend flexibility\n", - "If the trend changes are being overfit (too much flexibility) or underfit (not enough flexiblity), you can adjust the strength of the sparse prior using the input argument `changepoint_prior_scale`. By default, this parameter is set to 0.05. Increasing it will make the trend *more* flexibile:" + "If the trend changes are being overfit (too much flexibility) or underfit (not enough flexibility), you can adjust the strength of the sparse prior using the input argument `changepoint_prior_scale`. By default, this parameter is set to 0.05. Increasing it will make the trend *more* flexible:" ] }, { diff --git a/python/fbprophet/forecaster.py b/python/fbprophet/forecaster.py index a662211..166b8b1 100644 --- a/python/fbprophet/forecaster.py +++ b/python/fbprophet/forecaster.py @@ -158,7 +158,7 @@ class Prophet(object): def setup_dataframe(self, df, initialize_scales=False): """Prepare dataframe for fitting or predicting. - Adds a time index and scales y. Creates auxillary columns 't', 't_ix', + Adds a time index and scales y. Creates auxiliary columns 't', 't_ix', 'y_scaled', and 'cap_scaled'. These columns are used during both fitting and predicting. @@ -214,7 +214,7 @@ class Prophet(object): if too_low or too_high: raise ValueError('Changepoints must fall within training data.') elif self.n_changepoints > 0: - # Place potential changepoints evenly throuh first 80% of history + # Place potential changepoints evenly through first 80% of history max_ix = np.floor(self.history.shape[0] * 0.8) cp_indexes = ( np.linspace(0, max_ix, self.n_changepoints + 1)