% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/viterbi.R
\name{viterbi_decode}
\alias{viterbi_decode}
\title{Decode the most likely hidden-state path via the Viterbi algorithm.}
\usage{
viterbi_decode(x, fit)
}
\arguments{
\item{x}{Numeric vector of observations (log returns).}

\item{fit}{A fitted HMM object returned by \code{\link{fit_hmm_em}}.}
}
\value{
An integer vector of length \code{length(x)} with state labels
  (1-indexed).
}
\description{
Decode the most likely hidden-state path via the Viterbi algorithm.
}
