Description Usage Arguments Value Author(s) Examples
Functions calculates predictors which are required by the model and uses them for prediction
1 2 3 4 |
model |
The final model from either caret's train or rfe. Use model$fit$finalModel or model$finalModel to get it |
inpath |
Path to the MSG data |
sceneraster |
If no inpath is specified: The Meteosat data from which rainfall should be predicted. Load them with getChannels |
rainmask |
A raster indicates areas which are not raining with NA values |
sunzenith |
If no inpath is specified: sunzenith optional. Only needed if included in the predictor variables |
date |
If no inpath is specified: date optional. only needed if jday is included in the predictor variables |
useOptimal |
if model is a rfe object: Logical. Use the optimal variables from rfe or those less variables which lead to a model performance within one sd of the optimal model? |
scaleparam |
A data.frame created with |
type |
If inpath!=NULL then the data type of the MSG raster |
A Raster Layer containing predicted rainfall
Hanna Meyer
1 2 3 4 5 6 7 8 9 10 11 12 | # stack the msg scenes:
msg_example <-getChannels(inpath=system.file("extdata/msg",package="Rainfall"))
reference <- raster(system.file("extdata/radar",
"201007121650_radolan_SGrid.rst",package="Rainfall"))
values(reference)[values(reference<0.06)]=NA
data(rfemodel)
#predict on the new scene (don't expect good results from the small model!)
pred<-predictRainfall(model=rfeModel, sceneraster=msg_example, rainmask=reference)
validate(obs=reference,pred=pred)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.