- #GET OPTIONAL PARAMS
- # Similarity computed with exogenous variables ? endogenous ? both ? ("exo","endo","mix")
- simtype = ifelse(hasArg("simtype"), list(...)$simtype, "mix")
- simthresh = ifelse(hasArg("simthresh"), list(...)$simthresh, 0.)
- kernel = ifelse(hasArg("kernel"), list(...)$kernel, "Gauss") #or "Epan"
- mix_strategy = ifelse(hasArg("mix_strategy"), list(...)$mix_strategy, "mult") #or "neighb"
- same_season = ifelse(hasArg("same_season"), list(...)$same_season, FALSE)
- if (hasArg(h_window))
- return (.predictShapeAux(fdays_indices, today, horizon, list(...)$h_window, kernel,
- simtype, simthresh, mix_strategy, TRUE))
- #END GET
+ # Indices of similar days for cross-validation; TODO: 20 = magic number
+ cv_days = getSimilarDaysIndices(today, data, limit=20, same_season=FALSE,
+ days_in=fdays)