| nmfkc.DOT | R Documentation |
Produces a Graphviz DOT script visualizing the structure of an NMF model
(Y \approx X C A) or its simplified forms.
Supported visualization types:
"YX" — Standard NMF view: latent factors X map to observations Y.
"YA" — Direct regression view: covariates A map directly to Y
using the combined coefficient matrix X C.
"YXA" — Full tri-factorization: A \rightarrow C \rightarrow X \rightarrow Y.
Edge widths are scaled by coefficient magnitude, and nodes with no edges above the threshold are omitted from the visualization.
nmfkc.DOT(
result,
type = c("YX", "YA", "YXA"),
threshold = 0.01,
C.signed = NULL,
sig.level = 0.1,
rankdir = "LR",
fill = TRUE,
weight_scale = 5,
weight_scale_ax = weight_scale,
weight_scale_xy = weight_scale,
weight_scale_ay = weight_scale,
Y.label = NULL,
X.label = NULL,
A.label = NULL,
Y.title = "Observation (Y)",
X.title = "Basis (X)",
A.title = "Covariates (A)",
hide.isolated = TRUE
)
result |
The return value from |
type |
Character string specifying the visualization style:
one of |
threshold |
Minimum coefficient magnitude to display an edge. When
|
C.signed |
Logical or |
sig.level |
Significance level for filtering C edges when inference
results are available (i.e., |
rankdir |
Graphviz rank direction (e.g., |
fill |
Logical; whether nodes should be drawn with filled shapes. |
weight_scale |
Base scaling factor for edge widths. |
weight_scale_ax |
Scaling factor for edges |
weight_scale_xy |
Scaling factor for edges |
weight_scale_ay |
Scaling factor for edges |
Y.label |
Optional character vector for labels of Y nodes. |
X.label |
Optional character vector for labels of X (latent factor) nodes. |
A.label |
Optional character vector for labels of A (covariate) nodes. |
Y.title |
Cluster title for Y nodes. |
X.title |
Cluster title for X nodes. |
A.title |
Cluster title for A nodes. |
hide.isolated |
Logical. If |
A character string representing a Graphviz DOT script.
nmfkc, nmfae.DOT, nmf.sem.DOT,
nmfkc.ar.DOT, plot.nmfkc.DOT
Y <- matrix(cars$dist, nrow = 1)
A <- rbind(1, cars$speed)
result <- nmfkc(Y, A, rank = 1)
dot <- nmfkc.DOT(result)
cat(dot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.