| nmfkc.ar.DOT | R Documentation |
Produces a Graphviz DOT script for visualizing autoregressive
NMF-with-covariates models constructed via nmfkc.ar + nmfkc.
The diagram displays three types of directed relationships:
Lagged predictors: T_{t-k} \rightarrow X,
Current latent factors: X \rightarrow T_t,
Optional intercept effects: Const -> X.
Importantly, no direct edges from lagged variables to current outputs
(T_{t-k} \rightarrow T_t) are drawn, in accordance with the NMF-AR
formulation.
Each block of lagged variables is displayed in its own DOT subgraph (e.g., “T-1”, “T-2”, ...), while latent factor nodes and current-time outputs are arranged in separate clusters.
nmfkc.ar.DOT(
result,
degree = 1,
intercept = any(colnames(result$C) == "(Intercept)"),
threshold = 0.1,
rankdir = "RL",
fill = TRUE,
weight_scale_xy = 5,
weight_scale_lag = 5,
weight_scale_int = 3,
hide.isolated = TRUE
)
result |
A fitted |
degree |
Maximum AR lag to visualize. |
intercept |
Logical; if |
threshold |
Minimum coefficient magnitude required to draw an edge. |
rankdir |
Graphviz rank direction (e.g., |
fill |
Logical; whether nodes are filled with color. |
weight_scale_xy |
Scaling factor for edges |
weight_scale_lag |
Scaling factor for lagged edges |
weight_scale_int |
Scaling factor for intercept edges. |
hide.isolated |
Logical. If |
A character string representing a Graphviz DOT file.
nmfkc.ar, nmfkc, plot.nmfkc.DOT
d <- AirPassengers
ar_data <- nmfkc.ar(d, degree = 2)
result <- nmfkc(ar_data$Y, ar_data$A, rank = 1)
dot <- nmfkc.ar.DOT(result, degree = 2)
cat(dot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.