create_partitions: Create data partitions

Description Usage Arguments

View source: R/data_splitting.R

Description

Create n data partitions for training with equal sized classes via resampling.

Usage

1
2
create_partitions(df, dep_var, level = NULL, n = 100L, major_class_wt = 1,
  seed = 379L, test_pct = 0.33, binomial = TRUE)

Arguments

df

A data.frame for analysis

dep_var

A character string denoting the dependent variable in df.

level

level of interest. If NULL takes the 2nd level of a factor variable or the 2nd unique value from a non-factor variable.

n

An integer denoting the number of ensembles to build. Defaults to 100L.

major_class_wt

Controls the number of major class cases selected in each partition as a multiple of the number of minority class observations. Defaults to 1, which will produce equal sized sets of minority and non-minority class in each partition. Must be greater than or equal to 1.

seed

An integer. Seed for reproducibility. Defaults to 379L.

test_pct

A number in (0,1) specifying the size of the test dataset as a percentage. Defaults to 0.33

binomial

Logical. Does the response variable follow a Binomial distribution? Defaults to TRUE.


alexWhitworth/glmEnsemble documentation built on Nov. 5, 2021, 6:55 a.m.