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

View source: R/utils.R

randomize_feature_orderR Documentation

Randomize feature order to eliminate any position-dependent effects

Description

Randomize feature order to eliminate any position-dependent effects

Usage

randomize_feature_order(dataset, outcome_colname)

Arguments

dataset

Data frame with an outcome variable and other columns as features. Alternatively, the input can be in TreeSummarizedExperiment format.

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

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")

mikropml documentation built on Dec. 1, 2025, 9:08 a.m.