/// <summary> /// Constructs a new Hidden Markov Model with discrete state probabilities. /// </summary> /// <param name="topology"> /// A <see cref="Topology"/> object specifying the initial values of the matrix of transition /// probabilities <c>A</c> and initial state probabilities <c>pi</c> to be used by this model. /// </param> /// <param name="emissions"> /// The initial emission probability distribution to be used by each of the states. /// </param> public ContinuousHiddenMarkovModel(ITopology topology, IDistribution emissions) : base(topology) { if (emissions == null) { throw new ArgumentNullException("emissions"); } // Initialize B using the initial distribution B = new IDistribution[States]; for (int i = 0; i < B.Length; i++) { B[i] = (IDistribution)emissions.Clone(); } if (B[0] is IMultivariateDistribution) { dimension = ((IMultivariateDistribution)B[0]).Dimension; } else { dimension = 1; } }
/// <summary> /// Constructs a new Hidden Markov Model with discrete state probabilities. /// </summary> /// <param name="topology"> /// A <see cref="Topology"/> object specifying the initial values of the matrix of transition /// probabilities <c>A</c> and initial state probabilities <c>pi</c> to be used by this model. /// </param> /// <param name="emissions"> /// The initial emission probability distribution to be used by each of the states. /// </param> public ContinuousHiddenMarkovModel(ITopology topology, IDistribution emissions) : base(topology) { if (emissions == null) { throw new ArgumentNullException("emissions"); } // Initialize B using the initial distribution B = new IDistribution[States]; for (int i = 0; i < B.Length; i++) B[i] = (IDistribution) emissions.Clone(); if (B[0] is IMultivariateDistribution) dimension = ((IMultivariateDistribution) B[0]).Dimension; else dimension = 1; }