cross_valid_kfold: cross_valid_kfold

Description Usage Arguments Value

View source: R/cross_validation.r

Description

k-fold cross validation run to collect predictions for assessment

Usage

1
2
cross_valid_kfold(data, formula, resp = all.vars(formula)[1], family,
  K = 10, model = glm, N = 1)

Arguments

data,

a data.frame containing response and observations variables used in the formula.

formula,

relation of response ~ observation to be examined.

resp,

a character vector of the names of dependent/response variables in df

family,

a character string indicating the family associated with the submitted model c('gaussian','binomial','poisson'...)

K,

a numeric variable indicating the number of folds for the k-fold validation

model,

a model associated for testing the variables c(glm,lm)

N,

a numeric value indicating the number of times to run cross-validation

Value

list of cross-validation results: pred_out matrix of predictions (observations x fold), train_out matrix of indicies used for each fold of cross-validation (observations x fold), labels_out matrix of ground truth labels (observations x fold)


LewisLabUCSD/RegressionModelPipeline documentation built on Jan. 11, 2021, 10:33 p.m.