randomize_feature_order: Randomize feature order to eliminate any position-dependent...

Description Usage Arguments Value Author(s) Examples

View source: R/utils.R

Description

Randomize feature order to eliminate any position-dependent effects

Usage

1
randomize_feature_order(dataset, outcome_colname)

Arguments

dataset

Dataframe with an outcome variable and other columns as features.

outcome_colname

Column name as a string of the outcome variable (default NULL; the first column will be chosen automatically).

Value

Dataset with feature order randomized.

Author(s)

Nick Lesniak, nlesniak@umich.edu

Kelly Sovacool, sovacool@umich.edu

Examples

1
2
3
4
5
dat <- data.frame(
  outcome = c("1", "2", "3"),
  a = 4:6, b = 7:9, c = 10:12, d = 13:15
)
randomize_feature_order(dat, "outcome")

SchlossLab/mikropml documentation built on Nov. 25, 2021, 1:13 p.m.