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