Description Usage Arguments Details Value Author(s) Examples
This function initialises a general discrete time and discrete space Stochastic Automata(SA). A SA consists of an alphabet of states, input and output symbols. The SA is designed to make inference on the states through the observation of input symbols on output symbols. The stochastics of the SA is fully described by the set of states, input and output symbols and the conditional probablities (i.e. state transition probablity and output symbols emission probablity by inputs symbols on state set).
1 | initSA(states,inputSymbols,outputSymbols,emissionProb,transitionProb)
|
states |
Vector with names of states. |
inputSymbols |
Vector with names of input Symbols. |
outputSymbols |
Vector with names of output Symbols. |
emissionProb |
Stochastic matrix containing emission probablities of output symbols between states and input symbols. |
transitionProb |
Stochastic matrix containing probablities between states. |
The column sum of transitionProb
and emissionProb
must be equal to 1. Otherwise this function generates an error message.
This function initSA
returns an SA that consists of a list of 5 elements:
States |
Vector with names of states. |
inputSymbols |
Vector with names of input Symbols. |
outputSymbols |
Vector with names of output Symbols. |
outputSymbols |
Vector with names of output Symbols. |
emissionProb |
Annotated matrix containing emission probablities of output symbols between states and input symbols. |
transitionProb |
Annotated matrix containing probablities between states. |
Rehman Ahmad <rehman.ahmad777@gmail.com>
1 2 3 4 5 6 | states<-c('s1','s2')
inputSymbols<-c('a','b')
outputSymbols<-c(0,1)
transProb<-matrix(c(0.70,0.50, 0.30,0.50), nrow = 2, ncol = 2,byrow = TRUE)
emissionProb<-matrix(c(0.50,0.30, 0.40,0.60,.50,.70,.60,.40), nrow = 2, ncol = 4, byrow = TRUE)
initsa<-initSA(states,inputSymbols,outputSymbols,emissionProb,transProb)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.