This is the main function to execute the machine learning training and prediction. Note it will be deployed by each node you requested if the qsub feature is enabled below.
Usage
downscale_main(
settings,
analysis,
covariates.dir,
time,
variable,
outdir,
base.map.dir,
method = "randomForest",
cores = parallel::detectCores()
)Arguments
- settings
character: physical path that points to the pecan settings XML file.
- analysis
numeric: data frame (rows: ensemble member; columns: site*state_variables) of updated ensemble analysis results from the `sda_enkf` function.
- covariates.dir
character: path to the exported covariates GeoTIFF file.
- time
character: the time tag used to differentiate the outputs from others.
- variable
character: name of state variable. It should match up with the column names of the analysis data frame.
- outdir
character: the output directory where the downscaled maps will be stored.
- base.map.dir
character: path to the GeoTIFF file within which the extents and CRS will be used to generate the ensemble maps.
- method
character: machine learning method, default is randomForest (currently support randomForest and xgboost).
- cores
numeric: how many CPus to be used in the calculation, the default is the total CPU number you have.