Kaynağa Gözat

Merge remote-tracking branch 'origin/master' into v0.2

Ben Letham 8 yıl önce
ebeveyn
işleme
d48b70b106

+ 11 - 0
.travis.yml

@@ -0,0 +1,11 @@
+language: python
+python:
+  - "2.7"
+  - "3.6"
+
+install:
+  - pip install --upgrade pip
+  - pip install -U -r python/requirements.txt
+
+script:
+  - cd python && python setup.py develop test

+ 2 - 2
docs/Makefile

@@ -3,7 +3,7 @@ notebooks:
 	do \
 	do \
 	    NAME=$$(basename $$f .ipynb); \
 	    NAME=$$(basename $$f .ipynb); \
 	    jupyter nbconvert --to markdown ../notebooks/$$NAME.ipynb --template=nbconvert_template.tpl; \
 	    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; \
 	    rm -rf static/"$$NAME"_files; \
-	    mv "$$NAME"_files static/; \
+	    mv ../notebooks/"$$NAME"_files static/; \
 	done
 	done

+ 1 - 1
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
 # Python
 # Python

+ 1 - 1
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.
 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
 ### 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
 # R
 # R

+ 1 - 1
notebooks/quick_start.ipynb

@@ -119,7 +119,7 @@
    "cell_type": "markdown",
    "cell_type": "markdown",
    "metadata": {},
    "metadata": {},
    "source": [
    "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."
    ]
    ]
   },
   },
   {
   {

+ 1 - 1
notebooks/trend_changepoints.ipynb

@@ -153,7 +153,7 @@
    "metadata": {},
    "metadata": {},
    "source": [
    "source": [
     "### Adjusting trend flexibility\n",
     "### 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:"
    ]
    ]
   },
   },
   {
   {

+ 2 - 2
python/fbprophet/forecaster.py

@@ -165,7 +165,7 @@ class Prophet(object):
     def setup_dataframe(self, df, initialize_scales=False):
     def setup_dataframe(self, df, initialize_scales=False):
         """Prepare dataframe for fitting or predicting.
         """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
         'y_scaled', and 'cap_scaled'. These columns are used during both
         fitting and predicting.
         fitting and predicting.
 
 
@@ -221,7 +221,7 @@ class Prophet(object):
                 if too_low or too_high:
                 if too_low or too_high:
                     raise ValueError('Changepoints must fall within training data.')
                     raise ValueError('Changepoints must fall within training data.')
         elif self.n_changepoints > 0:
         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)
             max_ix = np.floor(self.history.shape[0] * 0.8)
             cp_indexes = (
             cp_indexes = (
                 np.linspace(0, max_ix, self.n_changepoints + 1)
                 np.linspace(0, max_ix, self.n_changepoints + 1)

+ 5 - 0
python/requirements.txt

@@ -0,0 +1,5 @@
+Cython>=0.22
+pystan>=2.14
+numpy>=1.10.0
+pandas>=0.18.1
+matplotlib>=2.0.0