View source: R/model_extractors.R
| get_selected_Z | R Documentation |
Reads model$select$selectZ, auto-detecting the model type from
class(model) and collapsing any per-cluster selection matrix (a
parallel-model layer's selectZ can be a K x M matrix rather
than a plain vector) to one logical value per feature via an internal
helper. Unlike exposure selection, every
stage of a serial model has a meaningful omics selection, so this returns
a per-stage breakdown rather than one stage's alone.
get_selected_Z(model, layer = NULL, stage = NULL)
model |
A fitted |
layer |
For a parallel model (or a serial stage that is itself a
parallel sub-model): which layer's own omics selection to return. If
|
stage |
For a serial model only: which stage's own omics selection to
return. If |
A named logical vector (early; parallel with layer given),
a named list of logical vectors (parallel with layer = NULL), or
a named list of per-stage results (serial).
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, Rho_Z_Mu = 5,
max_itr = 10, max_tot.itr = 30)
get_selected_Z(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.