Skip to contents

This function helps to calculate the out-of-sample accuracy of residual predictions.

Usage

debias.train.accuracy(
  pred.name,
  cov.names,
  dat.train,
  var.name,
  py.init,
  ratio = 0.8
)

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.

Value

list: the variable importance of the ML and RMSE of the out-of-sample predictions.

Author

Dongchen Zhang