Fix notebook Makefile and various typos

This commit is contained in:
bl 2017-07-04 08:39:49 -07:00
parent 1339aada96
commit 03d3ec9f2e
6 changed files with 8 additions and 8 deletions

View file

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

View file

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

View file

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

View file

@ -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."
]
},
{

View file

@ -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:"
]
},
{

View file

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