Returns the number of features in an amR pangenome.

getNumFeat(ml_input_tibble)

Arguments

ml_input_tibble

An ML-ready tibble generated by loadMLInputTibble(). This must have a target variable column named either genome_drug.resistant_phenotype ("Resistant" or "Susceptible " classification for one bug/drug combination) or resistant_classes (multi-class classification for determining the drug classes to which each genome is resistant), but not both.

Value

Number of features

Examples

ml <- tibble::tibble(
  genome_id = paste0("g", 1:6),
  genome_drug.resistant_phenotype = rep(c("Resistant", "Susceptible"), each = 3),
  feat_a = c(1L, 0L, 1L, 0L, 1L, 0L),
  feat_b = c(0L, 1L, 0L, 1L, 0L, 1L)
)
getNumFeat(ml)
#> [1] 2