% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nmfkc.net.R
\name{nmfkc.net.DOT}
\alias{nmfkc.net.DOT}
\title{Generate a Graphviz DOT Diagram for a Symmetric NMF Network}
\usage{
nmfkc.net.DOT(
  result,
  threshold = 0.01,
  sig.level = 0.1,
  weight_scale = 5,
  weight_scale_xy = 1,
  weight_scale_xx = weight_scale,
  rankdir = "TB",
  fill = TRUE,
  hide.isolated = TRUE,
  Y.label = NULL,
  X.label = NULL,
  Y.title = "Nodes (Y)",
  X.title = "Basis (X)",
  show.theta = NULL,
  signed = inherits(result, "nmfkc.net.signed"),
  cluster.box = c("none", "normal", "faint", "invisible"),
  layout = c("fdp", "dot", "neato", "circo", "twopi"),
  X.color = NULL,
  Y.cluster = c("soft", "hard")
)
}
\arguments{
\item{result}{A list returned by \code{nmfkc()} with
\code{Y.symmetric = "bi"} or \code{"tri"}, or the newer
\code{\link{nmfkc.net}} with \code{type = "bi"} or \code{"tri"}.
If inference results are present (from \code{\link{nmfkc.net.inference}}),
C edges are decorated with significance stars.}

\item{threshold}{Minimum coefficient value to display an edge.}

\item{sig.level}{Significance level for filtering C edges (if inference
results are present). Set to \code{NULL} to show all edges above threshold.}

\item{weight_scale}{Base scaling factor for edge widths.}

\item{weight_scale_xy}{Scaling factor for X edges (basis -> node).}

\item{weight_scale_xx}{Scaling factor for C edges (basis <-> basis).}

\item{rankdir}{Graphviz rank direction (\code{"TB"} or \code{"LR"}).}

\item{fill}{Logical; whether nodes are filled with color.}

\item{hide.isolated}{Logical; if TRUE, omit outer nodes with no X edge
above threshold.}

\item{Y.label}{Character vector of labels for outer nodes.}

\item{X.label}{Character vector of labels for basis nodes.}

\item{Y.title}{Cluster title for outer nodes.}

\item{X.title}{Cluster title for basis nodes.}

\item{show.theta}{Logical or NULL. Whether to draw C edges
between basis nodes. NULL = auto-detect (TRUE for tri, FALSE for bi).}

\item{signed}{Logical. If \code{TRUE}, \eqn{C} is treated as a signed
matrix: positive entries rendered as solid edges and negative as
dashed, with edge visibility threshold on \eqn{|C|}.  Default is
\code{inherits(result, "nmfkc.net.signed")} so that results from
\code{\link{nmfkc.net}} are auto-detected.}

\item{cluster.box}{Style of cluster box: \code{"none"}, \code{"normal"},
\code{"faint"}, \code{"invisible"}.}

\item{layout}{Graphviz layout engine: \code{"fdp"}, \code{"dot"},
\code{"neato"}, \code{"circo"}, \code{"twopi"}.}

\item{X.color}{Color palette for basis nodes (length Q).}

\item{Y.cluster}{Coloring mode for outer nodes: \code{"soft"} (weighted mix)
or \code{"hard"} (most probable basis color).}
}
\value{
A character string of class \code{c("nmfkc.net.DOT", "nmfkc.DOT")}
representing a valid Graphviz DOT script.
Use \code{plot()} to render (requires DiagrammeR).
}
\description{
Creates a Graphviz DOT script that visualizes the two-layer structure
of a symmetric NMF model (\eqn{Y \approx X C X^\top}).

The resulting diagram displays:
\itemize{
\item outer nodes: the original network nodes (rows/columns of Y),
\item inner nodes: the latent basis/group nodes (columns of X),
\item directed edges from basis to node: membership weights from X,
\item undirected edges between basis nodes: inter-group interactions
from C matrix (for tri-symmetric models only).
}
}
\section{Lifecycle}{

This function is \strong{experimental}. The interface may change in
future versions; details are to be described in an upcoming paper.
}

\examples{
\donttest{
library(nmfkc)
Y <- matrix(c(0,1,1,0,0,0,
              1,0,1,0,0,0,
              1,1,0,1,0,0,
              0,0,1,0,1,1,
              0,0,0,1,0,1,
              0,0,0,1,1,0), 6, 6)
res <- nmfkc.net(Y, rank = 2, type = "tri", nstart = 20)
dot <- nmfkc.net.DOT(res)
plot(dot)
}

}
\seealso{
\code{\link{nmfkc.net.inference}}, \code{\link{nmfkc.DOT}},
\code{\link{plot.nmfkc.DOT}}
}
