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