Uniformization
Documentation for Uniformization.
Uniformization.discrete_observation_times
Uniformization.erlangization
Uniformization.getdiagonal
Uniformization.getmaxrate
Uniformization.issquare
Uniformization.make_dtmc
Uniformization.make_dtmc!
Uniformization.off_diag_nonnegative
Uniformization.setdiagonal!
Uniformization.standard_uniformization
Uniformization.stationary_distribution
Uniformization.transitionratematrix
Uniformization.transitionratematrix!
Uniformization.uniformize
Uniformization.discrete_observation_times
โ Functiondiscrete_observation_times(Q, k=2^10, t=0.0)
Approximate ๐(t) = exp(t๐) using Pโ of Yoon & Shanthikumar (1989, p. 181), where the Rแตขโฑผ are the probability of starting at state ๐ and ending at state ๐ at time ๐ก. The k parameter should be set to a power of two for efficiency.
This method can give inaccurate results if k โค t * getmaxrate(Q)!
Uniformization.erlangization
โ Functionerlangization(Q, k=2^10, t=0.0)
Approximate ๐(t) = exp(t๐) using Pโ of Yoon & Shanthikumar (1989, p. 179), originally from Ross (1987), where the Rแตขโฑผ are the probability of starting at state ๐ and ending at state ๐ at time ๐ก. The k parameter should be set to a power of two for efficiency.
Uniformization.getdiagonal
โ Methodgetdiagonal(Q)
Get the row sums of Q to be used for setting the diagonal of a transition rate matrix.
Uniformization.getmaxrate
โ Methodgetmaxrate(Q)
Return the largest rate from the diagonal of the matrix Q.
Uniformization.issquare
โ Methodissquare(Q)
Test whether the matrix Q is square.
Uniformization.make_dtmc
โ Functionmake_dtmc(Q, ฮป=2^10)
Convert a transition rate matrix ๐ for a continuous-time Markov chain to a transition probability matrix ๐ for the corresponding discrete-time Markov chain.
Uniformization.make_dtmc!
โ Functionmake_dtmc!(Q, ฮป=2^10)
Convert a transition rate matrix ๐ for a continuous-time Markov chain to a transition probability matrix ๐ for the corresponding discrete-time Markov chain, in place.
Uniformization.off_diag_nonnegative
โ Methodoff_diag_nonnegative(Q)
Test whether the off-diagonal elements of Q are non-negative, as is required for transition rate matrices.
Uniformization.setdiagonal!
โ Methodsetdiagonal!(Q)
Set the diagonal of Q to be the row sums. Modifies Q.
Uniformization.standard_uniformization
โ Functionstandard_uniformization(Q, k=2^10, t=0.0, ฯต=10e-9; p0)
Approximate ๐ฉ(t) = exp(t๐)๐ฉ(0) using standard uniformization with left and right truncation of the Poisson distribution used to approximate the number of jumps up to time t. The rules for choosing the left and right truncation points are based on Reibman & Trivedi (1988, Computers & Operations Research).
Note that this computes ๐ฉ(t) on the fly; it does not return the matrix ๐(t) as erlangization() and discreteobservation() do.
Uniformization.stationary_distribution
โ Methodstationary_distribution(Q)
Calculate the stationary distribution of a full transition rate matrix ๐ by solving ๐๐ฑ = 0.
Uniformization.transitionratematrix!
โ Methodtransitionratematrix!(Q)
Convert the matrix Q to one that fulfills the requirements of a transition rate matrix.
Uniformization.transitionratematrix
โ Methodtransitionratematrix(Q)
Create a copy of the matrix Q that fulfills the requirements of a transition rate matrix.
Uniformization.uniformize
โ Functionuniformize(Q, p0, k=2^10, t=0.0,
method::Function=erlangization, args...)
Approximate ๐ฉ(t) = exp(t๐)๐ฉ(0) using uniformization. The parameter k controls the rate of transitions occurring in the approximated process. Higher k leads to a better approximation. Returns a (normalized) distribution over the states at time ๐ก.
Uses Erlangization/external uniformization by default because it seems to be the most robust with stiff problems.