View source: R/model_extractors.R
| get_top_omics_features | R Documentation |
Reuses plot_cluster_omic_profile()'s own feature-ranking criterion
(see its documentation for what "separation" means) rather than
introducing a second ranking rule: this is the same score
plot_cluster_omic_profile() sorts features by, just returned as
data instead of a plot. One panel is produced per relevant unit – the
whole omics matrix for early, one per layer for parallel, and for serial
one per stage (or one per layer within a stage that is itself parallel).
get_top_omics_features(
model,
top_n = 10,
importance = c("separation", "range", "sd")
)
model |
A fitted |
top_n |
Number of top features to return per panel (default 10). If
a panel has fewer features than |
importance |
Ranking criterion: "separation" (between-cluster spread
over within-cluster SD, the default), "range", or "sd" of the cluster
means – identical meaning to |
A named list, one entry per panel (layer/stage), each a named
numeric vector of the top top_n features by importance,
sorted descending.
idx <- 1:200
G <- sim_data$G[idx, ]
Z <- sim_data$Z[idx, ]
Y_normal <- sim_data$Y_normal[idx, ]
fit <- estimate_lucid(G = G, Z = Z, Y = Y_normal, lucid_model = "early",
family = "normal", K = 2,
max_itr = 10, max_tot.itr = 30)
get_top_omics_features(fit, top_n = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.