% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mogen.R
\name{mogen_transitions}
\alias{mogen_transitions}
\title{Extract Transition Table from a MOGen Model}
\usage{
mogen_transitions(x, order = NULL, min_count = 1L)
}
\arguments{
\item{x}{A \code{net_mogen} object from \code{build_mogen()}.}

\item{order}{Integer. Which order's transitions to extract.
Defaults to the optimal order selected by the model.}

\item{min_count}{Integer. Minimum observed count to include (default 1).
Use this to filter out rare transitions that have unreliable probabilities.}
}
\value{
A data frame with columns:
\describe{
\item{path}{The full state sequence (e.g., "AI -> FAIL -> SOLVE").}
\item{count}{Number of times this transition was observed.}
\item{probability}{Transition probability P(to | from).}
\item{from}{The context / conditioning states (k-gram source node).}
\item{to}{The predicted next state.}
}
}
\description{
Returns a data frame of all transitions at a given Markov order,
sorted by count (descending). Each row shows the full path as a readable
sequence of states, along with the observed count and transition probability.
}
\details{
At order k, each edge in the De Bruijn graph represents a (k+1)-step path.
For example, at order 2, the edge from node "AI -> FAIL" to node
"FAIL -> SOLVE" represents the three-step path AI -> FAIL -> SOLVE.
The \code{path} column reconstructs this full sequence for readability.
}
\examples{
seqs <- list(c("A","B","C","D"), c("A","B","C","A"), c("B","C","D","A"))
mg <- build_mogen(seqs, max_order = 2)
mogen_transitions(mg, order = 1)

\donttest{
trajs <- list(c("A","B","C","D"), c("A","B","D","C"),
              c("B","C","D","A"), c("C","D","A","B"))
m <- build_mogen(trajs, max_order = 3)
mogen_transitions(m, order = 1)
}

}
