Accord.Statistics.Models.Markov.Learning.BaumWelchLearning.ComputeForwardBackward C# (CSharp) Method

ComputeForwardBackward() protected method

Computes the forward and backward probabilities matrices for a given observation referenced by its index in the input training data.
protected ComputeForwardBackward ( int index, double &fwd, double &bwd, double &scaling ) : void
index int The index of the observation in the input training data.
fwd double Returns the computed forward probabilities matrix.
bwd double Returns the computed backward probabilities matrix.
scaling double Returns the scaling parameters used during calculations.
return void
        protected override void ComputeForwardBackward(int index, out double[,] fwd, out double[,] bwd,
                                                       out double[] scaling)
        {
            fwd = ForwardBackwardAlgorithm.Forward(model, discreteObservations[index], out scaling);
            bwd = ForwardBackwardAlgorithm.Backward(model, discreteObservations[index], scaling);
        }