/// Construct new Hidden MarkovModel with the given transition, observation, and initial
/// state matrices and vectors already in log-probability space.
Construct new Hidden MarkovModel with the given transition, observation, and initial
state matrices and vectors already in log-probability space.
Construct new Hidden MarkovModel with the given transition observation and initial state matrices and vectors already in log - probability space .
pub fn new(
            transition: Array2<LogProb>,
            observation: Array2<LogProb>,
            initial: Array1<LogProb>,
        ) -> Result<Self> {
            let (an0, an1) = transition.dim();
            let (bn, bm) = observation.dim();
            let pin = initial.dim();
            if an0 != an1 || an0 != bn || an0 != pin {
                Err(Error::InvalidDimension {
                    an0,
                    an1,
                    bn,
                    bm,
                    pin,
                })
            } else {
                Ok(Self {
                    transition,
                    observation,
                    initial,
                })
            }
        }
pub fn new ( transition : Array2 < LogProb > , observation : Array2 < LogProb > , initial : Array1 < LogProb > , ) -> Result < Self > { let ( an0 , an1 ) = transition . dim ( ) ; let ( bn , bm ) = observation . dim ( ) ; let pin = initial . dim ( ) ; if an0 != an1 || an0 != bn || an0 != pin { Err ( Error :: InvalidDimension { an0 , an1 , bn , bm , pin , } ) } else { Ok ( Self { transition , observation , initial , } ) } }
Construct new Hidden MarkovModel with the given transition, observation, and initial
state matrices and vectors already in log-probability space.
Construct new Hidden MarkovModel with the given transition observation and initial state matrices and vectors already in log - probability space .
transition
Array2<LogProb>
observation
Array2<LogProb>
initial
Array1<LogProb>