mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-18 08:53:42 +00:00
Minor rearrange
This commit is contained in:
parent
74b21f7cd9
commit
a1803a8801
1 changed files with 6 additions and 5 deletions
|
|
@ -133,10 +133,11 @@ def cross_validation(model, horizon, period=None, initial=None, parallel=None, c
|
||||||
period = 0.5 * horizon if period is None else pd.Timedelta(period)
|
period = 0.5 * horizon if period is None else pd.Timedelta(period)
|
||||||
|
|
||||||
# Set initial
|
# Set initial
|
||||||
if initial is None:
|
initial = (
|
||||||
initial = max(3 * horizon, seasonality_dt)
|
max(3 * horizon, seasonality_dt) if initial is None
|
||||||
else:
|
else pd.Timedelta(initial)
|
||||||
initial = pd.Timedelta(initial)
|
)
|
||||||
|
|
||||||
# Compute Cutoffs
|
# Compute Cutoffs
|
||||||
cutoffs = generate_cutoffs(df, horizon, initial, period)
|
cutoffs = generate_cutoffs(df, horizon, initial, period)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue