mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-18 08:53:42 +00:00
Minor docstring updates
This commit is contained in:
parent
0d0f508cf1
commit
fb82a6a43d
2 changed files with 14 additions and 8 deletions
|
|
@ -62,7 +62,7 @@ def cross_validation(model, horizon, period=None, initial=None, parallel=None, c
|
||||||
"""Cross-Validation for time series.
|
"""Cross-Validation for time series.
|
||||||
|
|
||||||
Computes forecasts from historical cutoff points, which user can input.
|
Computes forecasts from historical cutoff points, which user can input.
|
||||||
If not provided beginning from (end - horizon), works backwards making
|
If not provided, begins from (end - horizon) and works backwards, making
|
||||||
cutoffs with a spacing of period until initial is reached.
|
cutoffs with a spacing of period until initial is reached.
|
||||||
|
|
||||||
When period is equal to the time interval of the data, this is the
|
When period is equal to the time interval of the data, this is the
|
||||||
|
|
@ -70,17 +70,17 @@ def cross_validation(model, horizon, period=None, initial=None, parallel=None, c
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
model: Prophet class object. Fitted Prophet model
|
model: Prophet class object. Fitted Prophet model.
|
||||||
horizon: string with pd.Timedelta compatible style, e.g., '5 days',
|
horizon: string with pd.Timedelta compatible style, e.g., '5 days',
|
||||||
'3 hours', '10 seconds'.
|
'3 hours', '10 seconds'.
|
||||||
period: string with pd.Timedelta compatible style. Simulated forecast will
|
period: string with pd.Timedelta compatible style. Simulated forecast will
|
||||||
be done at every this period. If not provided, 0.5 * horizon is used.
|
be done at every this period. If not provided, 0.5 * horizon is used.
|
||||||
initial: string with pd.Timedelta compatible style. The first training
|
initial: string with pd.Timedelta compatible style. The first training
|
||||||
period will begin here. If not provided, 3 * horizon is used.
|
period will include at least this much data. If not provided,
|
||||||
cutoffs: list of pd.Timestamp representing cutoff to be used during
|
3 * horizon is used.
|
||||||
cross-validtation. If not provided works beginning from
|
cutoffs: list of pd.Timestamp specifying cutoffs to be used during
|
||||||
(end - horizon), works backwards making cutoffs with a spacing of period
|
cross validtation. If not provided, they are generated as described
|
||||||
until initial is reached.
|
above.
|
||||||
parallel : {None, 'processes', 'threads', 'dask', object}
|
parallel : {None, 'processes', 'threads', 'dask', object}
|
||||||
|
|
||||||
How to parallelize the forecast computation. By default no parallelism
|
How to parallelize the forecast computation. By default no parallelism
|
||||||
|
|
|
||||||
|
|
@ -1399,7 +1399,13 @@ class Prophet(object):
|
||||||
return sim_values
|
return sim_values
|
||||||
|
|
||||||
def predictive_samples(self, df):
|
def predictive_samples(self, df):
|
||||||
"""Sample from the posterior predictive distribution.
|
"""Sample from the posterior predictive distribution. Returns samples
|
||||||
|
for the main estimate yhat, and for the trend component. The shape of
|
||||||
|
each output will be (nforecast x nsamples), where nforecast is the
|
||||||
|
number of points being forecasted (the number of rows in the input
|
||||||
|
dataframe) and nsamples is the number of posterior samples drawn.
|
||||||
|
This is the argument `uncertainty_samples` in the Prophet constructor,
|
||||||
|
which defaults to 1000.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue