Description Usage Arguments Value Author(s) Examples
The function summarizes the validation scenario and
returns the root mean squared error (RMSE) of the predictions.
The typical validation procedure is: start with the trueData
.
Remove some validation points to obtain artificially generated dataObserved
.
Predicting the validation points based on dataObserved
leads to dataFilled
.
1 2 3 4 5 6 |
dataObserved |
Numeric vector containing the observed data. |
dataFilled |
Numeric vector containing the filled (predicted) data.
Needs to have the same length as |
dataTrue |
Numeric vector containing the true data.
Needs to have the same length as |
include |
Logical vector indicating which element to include in the calculation of the RMSE. |
Numeric matrix with one 1 row and 6 columns having the entries:
nNA
: number of missing values in dataObserved
,
nFilled
: number of predicted values,
nNotFilled
: number of not predicted missing values,
ratioFilled
: ratio: nFilled
/ nNA
,
nCrossvali
: number of values for validation,
RMSE
: root mean squared error.
Florian Gerber, flora.fauna.gerber@gmail.com.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | Validate(c(1, NA, 2, NA), c(1, 2, 2, NA), c(1, 1, 2, 2))
## validate gap-fill predictions: consider the ndvi data
Image(ndvi)
## define some validation points vp
## in the image of the day 145 of the year 2004
vp <- 300 + c(5:10) + rep(21 * c(0:5), each = 6)
## remove the vp values from the data
nn <- ndvi
nn[vp] <- NA
Image(nn)
## predict the vp values
out <- Gapfill(nn, subset = vp)
Validate(dataObserved = nn, dataFilled = out$fill,
dataTrue = ndvi)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.