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