cv_ml: Function to fit a 10 fold cross validated ML model. Currently...

Description Usage Arguments

View source: R/cv_ml.R

Description

Function to fit a 10 fold cross validated ML model. Currently only support binomial data.

Usage

1
2
cv_ml(points, layer_names, model_type = "randomforest", k = 20,
  fix_cov = NULL)

Arguments

points

A data.frame or sfc object containing 'n_trials', 'n_positive' fields

layer_names

Names of column corresponding covariates to use

model_type

Either 'randomForest', in which case a random forest

k

The number of folds to use

fix_cov

If wishing to fix the values of any covariates when producing fitted values, specify as list with 2 elements 'cov_name' and 'cov_val' e.g. fix_cov = list(cov_name = 'x', cov_val = 1) using the ranger package is fit or 'hal', in which case a highly adaptive lasso using the hal9001 package is fit. Note the 'hal' is computationally expensive and not recommended for large (>200) datasets.


disarm-platform/DiSARM documentation built on March 4, 2020, 3:49 p.m.