This function helps to calculate the out-of-sample accuracy of residual predictions.
Arguments
- pred.name
character: the name for the predictive variable.
- cov.names
character: the name for the covariates.
- dat.train
data.frame: data frame containing associated covariates and predictive variable for ML training.
- var.name
character: variable name to be predicted.
- py.init
R function: R function to initialize the python functions. Default is NULL. the default random forest will be used if `py.init` is NULL.
- ratio
numeric from 0 to 1: define the ratio of samples used for training. The rest samples will be used for calculating the out-of-sample accuracy. Default is 0.8.