flash_plot_structure | R Documentation |
Creates a “structure plot” (stacked bar plot) of posterior means for factors
f_{jk}
or loadings \ell_{ik}
. Different “topics” or components
(that is, the different factor/loadings pairs, as specified by kset
)
are represented by different colors. Values are normalized so that the
maximum absolute value for each factor f_{\cdot k}
or set of
loadings \ell_{\cdot k}
is equal to 1 and then stacked (see
ldf.flash
). Note that structure plots were designed for
nonnegative loadings or “memberships”; if posterior means are not
nonnegative then a different type of plot should be used (e.g.,
flash_plot_heatmap
). By default, a 1-d embedding is used to
arrange the rows i
or columns j
. This step is usually essential
to creating a readable structure plot; for details, see
structure_plot
.
flash_plot_structure(
fl,
order_by_pve = FALSE,
kset = NULL,
pm_which = c("factors", "loadings"),
pm_subset = NULL,
pm_groups = NULL,
pm_colors = NULL,
gap = 1,
...
)
fl |
An object inheriting from class |
order_by_pve |
If |
kset |
A vector of integers specifying the factor/loadings pairs to be
plotted. If |
pm_which |
Whether to plot loadings |
pm_subset |
A vector of row indices |
pm_groups |
A vector specifying the group to which each row of the data
|
pm_colors |
The colors of the “topics” or components (factor/loadings pairs). |
gap |
The horizontal spacing between groups. Ignored if |
... |
Additional parameters to be passed to
|
A ggplot
object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.