C# Класс Accord.Statistics.Models.Markov.HiddenMarkovModel

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Decode ( int observations, bool logarithm, double &probability ) : int[]

Calculates the most likely sequence of hidden states that produced the given observation sequence.

Decoding problem. Given the HMM M = (A, B, pi) and the observation sequence O = {o1,o2, ..., oK}, calculate the most likely sequence of hidden states Si that produced this observation sequence O. This can be computed efficiently using the Viterbi algorithm.

Decode ( int observations, double &probability ) : int[]

Calculates the most likely sequence of hidden states that produced the given observation sequence.

Decoding problem. Given the HMM M = (A, B, pi) and the observation sequence O = {o1,o2, ..., oK}, calculate the most likely sequence of hidden states Si that produced this observation sequence O. This can be computed efficiently using the Viterbi algorithm.

Evaluate ( int observations ) : double

Calculates the probability that this model has generated the given sequence.

Evaluation problem. Given the HMM M = (A, B, pi) and the observation sequence O = {o1, o2, ..., oK}, calculate the probability that model M has generated sequence O. This can be computed efficiently using the either the Viterbi or the Forward algorithms.

Evaluate ( int observations, bool logarithm ) : double

Calculates the probability that this model has generated the given sequence.

Evaluation problem. Given the HMM M = (A, B, pi) and the observation sequence O = {o1, o2, ..., oK}, calculate the probability that model M has generated sequence O. This can be computed efficiently using the either the Viterbi or the Forward algorithms.

HiddenMarkovModel ( ITopology topology, double emissions ) : System

Constructs a new Hidden Markov Model.

HiddenMarkovModel ( ITopology topology, int symbols ) : System

Constructs a new Hidden Markov Model.

HiddenMarkovModel ( double transitions, double emissions, double initial ) : System

Constructs a new Hidden Markov Model.

HiddenMarkovModel ( int states, int symbols ) : System

Constructs a new Hidden Markov Model.

Predict ( int observations, double &probabilities ) : int

Predicts the next observation occurring after a given observation sequence.

Predict ( int observations, int next ) : int[]

Predicts next observations occurring after a given observation sequence.

Predict ( int observations, int next, bool logarithm, double &probability, double &probabilities ) : int[]

Predicts the next observations occurring after a given observation sequence.

Predict ( int observations, int next, double &probability ) : int[]

Predicts next observations occurring after a given observation sequence.

ToContinuousModel ( ) : ContinuousHiddenMarkovModel

Converts this Discrete density Hidden Markov Model into a Continuous density model.

Приватные методы

Метод Описание
IHiddenMarkovModel ( Array sequence ) : double
IHiddenMarkovModel ( Array sequence, bool logarithm ) : double
IHiddenMarkovModel ( Array sequence, bool logarithm, double &probability ) : int[]
IHiddenMarkovModel ( Array sequence, double &probability ) : int[]

Описание методов

Decode() публичный Метод

Calculates the most likely sequence of hidden states that produced the given observation sequence.
Decoding problem. Given the HMM M = (A, B, pi) and the observation sequence O = {o1,o2, ..., oK}, calculate the most likely sequence of hidden states Si that produced this observation sequence O. This can be computed efficiently using the Viterbi algorithm.
public Decode ( int observations, bool logarithm, double &probability ) : int[]
observations int A sequence of observations.
logarithm bool True to return the log-likelihood, false to return /// the likelihood. Default is false (default is to return the likelihood).
probability double The state optimized probability.
Результат int[]

Decode() публичный Метод

Calculates the most likely sequence of hidden states that produced the given observation sequence.
Decoding problem. Given the HMM M = (A, B, pi) and the observation sequence O = {o1,o2, ..., oK}, calculate the most likely sequence of hidden states Si that produced this observation sequence O. This can be computed efficiently using the Viterbi algorithm.
public Decode ( int observations, double &probability ) : int[]
observations int A sequence of observations.
probability double The state optimized probability.
Результат int[]

Evaluate() публичный Метод

Calculates the probability that this model has generated the given sequence.
Evaluation problem. Given the HMM M = (A, B, pi) and the observation sequence O = {o1, o2, ..., oK}, calculate the probability that model M has generated sequence O. This can be computed efficiently using the either the Viterbi or the Forward algorithms.
public Evaluate ( int observations ) : double
observations int /// A sequence of observations. ///
Результат double

Evaluate() публичный Метод

Calculates the probability that this model has generated the given sequence.
Evaluation problem. Given the HMM M = (A, B, pi) and the observation sequence O = {o1, o2, ..., oK}, calculate the probability that model M has generated sequence O. This can be computed efficiently using the either the Viterbi or the Forward algorithms.
public Evaluate ( int observations, bool logarithm ) : double
observations int /// A sequence of observations. ///
logarithm bool /// True to return the log-likelihood, false to return /// the likelihood. Default is false. ///
Результат double

HiddenMarkovModel() публичный Метод

Constructs a new Hidden Markov Model.
public HiddenMarkovModel ( ITopology topology, double emissions ) : System
topology ITopology /// A object specifying the initial values of the matrix of transition /// probabilities A and initial state probabilities pi to be used by this model. ///
emissions double The emissions matrix B for this model.
Результат System

HiddenMarkovModel() публичный Метод

Constructs a new Hidden Markov Model.
public HiddenMarkovModel ( ITopology topology, int symbols ) : System
topology ITopology /// A object specifying the initial values of the matrix of transition /// probabilities A and initial state probabilities pi to be used by this model. ///
symbols int The number of output symbols used for this model.
Результат System

HiddenMarkovModel() публичный Метод

Constructs a new Hidden Markov Model.
public HiddenMarkovModel ( double transitions, double emissions, double initial ) : System
transitions double The transitions matrix A for this model.
emissions double The emissions matrix B for this model.
initial double The initial state probabilities for this model.
Результат System

HiddenMarkovModel() публичный Метод

Constructs a new Hidden Markov Model.
public HiddenMarkovModel ( int states, int symbols ) : System
states int The number of states for this model.
symbols int The number of output symbols used for this model.
Результат System

Predict() публичный Метод

Predicts the next observation occurring after a given observation sequence.
public Predict ( int observations, double &probabilities ) : int
observations int
probabilities double
Результат int

Predict() публичный Метод

Predicts next observations occurring after a given observation sequence.
public Predict ( int observations, int next ) : int[]
observations int
next int
Результат int[]

Predict() публичный Метод

Predicts the next observations occurring after a given observation sequence.
public Predict ( int observations, int next, bool logarithm, double &probability, double &probabilities ) : int[]
observations int
next int
logarithm bool
probability double
probabilities double
Результат int[]

Predict() публичный Метод

Predicts next observations occurring after a given observation sequence.
public Predict ( int observations, int next, double &probability ) : int[]
observations int
next int
probability double
Результат int[]

ToContinuousModel() публичный Метод

Converts this Discrete density Hidden Markov Model into a Continuous density model.
public ToContinuousModel ( ) : ContinuousHiddenMarkovModel
Результат ContinuousHiddenMarkovModel