train_glm: Train a glm model

Description Usage Arguments Value Examples

Description

This function wraps train to train a glm model with my prefered settings and a x_chr interface instead of a formula interface

Usage

1
2
3
4
5
6
train_glm(train_df, target = "fx", predictors, id_col = "img")

trainGlm(train_df, target = "fx", predictor_set, id_col = "img")

trainTestGlm(cohort_df, target = "fx", predictor_set, grp_col = "pt",
  img_id = "img")

Arguments

train_df

a radiograph-major data.frame with training examples. See StratifiedPartition to partition data.

target

chr(1) names of target to train

predictors

x_chr names of predictor columns

btlnck

Value

a caret S3 train object

Examples

1
2
3
train_glm(hipsCohort() %>% unnest(pre), target = "fx", predictors = str_c("PC", 1:10))
trainGlm(hipsCohort(), predictor_set="image")
trainTestGlm(hipsCohort(), predictor_set = "image")

mbadge/hipsMultimodal documentation built on May 9, 2019, 12:05 a.m.