de.jstacs.utils
Class StationaryDistribution

java.lang.Object
  extended by de.jstacs.utils.StationaryDistribution

public class StationaryDistribution
extends Object

This class can be used to determine the stationary distribution.

Author:
Jens Keilwagen

Constructor Summary
StationaryDistribution()
           
 
Method Summary
static double[][][] getAllConditionalStationaryDistributions(double[] probs, int alphabetSize)
          This method returns the conditional stationary distributions, i.e.
static double[] getStationaryDistribution(double[] condProbs, int alphabetSize)
          This method return the stationary distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StationaryDistribution

public StationaryDistribution()
Method Detail

getStationaryDistribution

public static double[] getStationaryDistribution(double[] condProbs,
                                                 int alphabetSize)
This method return the stationary distribution. This distribution can be defined over a single symbol, pairs of symbols, ...

Parameters:
condProbs - an array containing all conditional probabilities;
  • condProbs[0] = P(a_1|b_1)
  • condProbs[1] = P(a_2|b_1)
  • ...
alphabetSize - the number of symbols in the alphabet
Returns:
the stationary distribution

getAllConditionalStationaryDistributions

public static double[][][] getAllConditionalStationaryDistributions(double[] probs,
                                                                    int alphabetSize)
This method returns the conditional stationary distributions, i.e. for a homogeneous Markov model of order 2 it returns an array containing the stationary symbol distribution as first entry, the conditional stationary distribution of order 1 as second entry and the conditional distribution of order 2 as third entry.

Parameters:
probs - an array containing all (unconditional) probabilities
alphabetSize - the number of symbols in the alphabet
Returns:
the conditional stationary distribution
See Also:
getStationaryDistribution(double[], int)