Main Content

子链

Extract Markov subchain

描述

例子

sc=子链(mc,,,,状态返回子链sc从离散时间马尔可夫链中提取mc。子链包含状态状态以及所有可从状态

例子

全部收缩

Consider this theoretical, right-stochastic transition matrix of a stochastic process.

p = [[ 0 1 0 0 0 5 0 0 5 0 0 0 0 5 0 5 0 0 0 5 0 5 这是给予的

创建以过渡矩阵为特征的马尔可夫链p

p = [0 1 0 0;0.5 0 0.5 0;0 0 0.5 0.5;0 0 0.5 0.5];MC = DTMC(P);

绘制马尔可夫链的有向图。在视觉上使用节点颜色识别每个状态所属的通信类。

数字;图形图(MC,'colornodes',真的);

图包含一个轴对象。轴对象包含3个类型图形图的对象。这些对象代表瞬态,十足。

确定马尔可夫链的固定分布。

x =asymptotics(mc)
x =1×40.0000 0.0000 0.5000 0.5000

马尔可夫链最终被吸收到状态3and4,,,,and subsequent transitions are stochastic.

Extract the recurrent subchain of the Markov chain by passingmc子链并指定复发性的Aperiodic沟通类中的一个状态。

SC =子链(MC,3);

sc是一个DTMC目的。

绘制子链的有向图。

数字;图形图(SC,'colornodes',真的)

图包含一个轴对象。轴对象包含2个类型图形图的对象。该对象代表Aperiodic。

Consider this theoretical, right-stochastic transition matrix of a stochastic process.

p = [[ 0 5 0 5 0 0 0 0 5 0 5 0 0 0 0 5 0 5 0 0 0 5 0 5 这是给予的

创建以过渡矩阵为特征的马尔可夫链p。通过制度4命名州制度1。

p=[[0。50。500; 0 0.5 0.5 0; 0 0 0.5 0.5; 0 0 0.5 0.5]; mc = dtmc(P,'StateNames',,,,[["Regime 1"“政权2”“政权3”“政权4”);

绘制链的挖掘图。在视觉上使用节点颜色识别每个状态所属的通信类。

数字;图形图(MC,'colornodes',真的);

图包含一个轴对象。轴对象包含4个类型图形图的对象。这些对象代表瞬态,十足。

制度1和2处于自己的交流阶级,因为制度2没有过渡到制度1。

Extract the subchain containing Regime 2, a transient state. Display the transition matrix of the subchain.

SC =子链(MC,“政权2”); sc.P
ans =3×30 0 0 0.5000 0.5000 0.5000 - 0.5000 0.5000 - 0.5000

制度1不在子链中。

绘制子链的挖掘图。

数字;图形图(SC,'colornodes',真的);

图包含一个轴对象。轴对象包含3个类型图形图的对象。这些对象代表瞬态,十足。

The plot shows a unichain: a Markov chain containing one recurrent communicating class and the selected transient class.

输入参数

全部收缩

离散时间马尔可夫链withNumStates状态和过渡矩阵p,指定为DTMC目的。pmust be fully specified (no条目)。

在子链中包括的状态,指定为正整数,字符串向量或字符矢量的细胞向量的数字向量。

  • For a numeric vector, elements of状态correspond to rows of the transition matrixmc.P

  • 对于字符矢量的字符串向量或单元向量,状态必须是状态名称MC.StateNames

Example:[["Regime 1" "Regime 2"]

数据类型:双倍的|细绳|cell

输出参数

全部收缩

离散时间马尔可夫链,返回DTMC目的。sc是一个子链ofmccontaining the states状态and all states reachable from状态。子链的状态名称Sc.StateNamesare inherited frommc

Algorithms

  • 状态j可到达来自州一世如果有非零的概率从一世j在有限的步骤中。子链通过形成相关挖掘物的及传递闭合,然后列举一步过渡来确定可达性。

  • 子链在可达性下关闭,以确保过渡矩阵sc保持随机(即,行总和到1),,,,with transition probabilities identical to the transition probabilities inmc.P

  • 如果您在经常性交流类中指定状态,则子链extracts the entire communicating class. If you specify a state in a transient communicating class, then子链extracts the transient class and all classes reachable from the transient class. To extract a unichain, specify a state in each component transient class. Seeclassify

References

[[1这是给予的Gallager, R.G.随机过程:应用理论。英国剑桥:剑桥大学出版社,2013年。

[2]Horn, R., and C. R. Johnson.Matrix Analysis.英国剑桥:剑桥大学出版社,1985年。

版本历史记录

在R2017b中引入