analogs.train | R Documentation |
Analog method implementation
analogs.train(
x,
y,
dates,
n.analogs = 4,
sel.fun = "mean",
window = 7,
n.random = NULL,
pool = 0
)
x |
The grid data. Class: matrix. |
y |
The observations data. Class: matrix. |
dates |
Dates of the grid and observations data. |
n.analogs |
An integer. Number of analogs. Default is 4. |
sel.fun |
A string. Select a function to apply to the analogs selected for a given observation. Options are "mean", "wmean" (i.e., weighted mean), "max", "min", "median", "prcXX" (i.e., prc85 means the 85th percentile of the analogs values distribution). Default is "mean". the function applied to the analogs values, (i.e., sel.fun = c("mean","max","min","median","prcXX"), with default "mean") and the temporal window, (i.e., window = 0). |
window |
An integer. Window of days removed when selecting analogs. If window = 7, then 7 days after the observation date and the 7 days before the observation date are removed. Default is 0. |
n.random |
An integer. Choose N random analogs among the closest n.analogs. Default is NULL. |
pool |
An integer. Number of auxiliary analogs in case there are NaN or NA in the original analogs. |
The analogs actually is not a model in the sense that it is not really trained. The model would be the data where to search the analogs. For this reason this function only saves the information to search analogs in a list.
A list containing the grid data, the observations and a list with information concerning the analogs.
J. Bano-Medina
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.