Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Change language to: English - Português - 日本語

See the recommended documentation of this function

Manuel Scilab >> Algèbre Lineaire > classmarkov

# classmarkov

recurrent and transient classes of Markov matrix

### Calling Sequence

`[perm,rec,tr,indsRec,indsT]=classmarkov(M)`

### Arguments

M

real N x N Markov matrix. Sum of entries in each row should add to one.

perm

integer permutation vector.

rec, tr

integer vector, number (number of states in each recurrent classes, number of transient states).

indsRec,indsT

integer vectors. (Indexes of recurrent and transient states).

### Description

Returns a permutation vector `perm` such that

```M(perm,perm) = [M11 0 0 0 0   0]
[0 M22 0 0     0]
[0 0 M33       0]
[      ...      ]
[0 0       Mrr 0]
[* *        *  Q]```

Each `Mii` is a Markov matrix of dimension `rec(i) i=1,..,r`. `Q` is sub-Markov matrix of dimension `tr`. States 1 to sum(rec) are recurrent and states from r+1 to n are transient. One has `perm=[indsRec,indsT]` where indsRec is a vector of size sum(rec) and indsT is a vector of size tr.

### Examples

```//P has two recurrent classes (with 2 and 1 states) 2 transient states
P=genmarkov([2,1],2,'perm')
[perm,rec,tr,indsRec,indsT]=classmarkov(P);
P(perm,perm)```
{"ft_lang_label":"__label__en","ft_lang_prob":0.59618324,"math_prob":0.9690737,"size":1819,"snap":"2022-05-2022-21","text_gpt3_token_len":637,"char_repetition_ratio":0.104132235,"word_repetition_ratio":0.0060790274,"special_character_ratio":0.2957669,"punctuation_ratio":0.12727273,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9947524,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-18T13:27:01Z\",\"WARC-Record-ID\":\"<urn:uuid:c2d04a75-2226-4ae0-abf8-7ebb5482eac3>\",\"Content-Length\":\"27039\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:aa5389e2-562b-4eba-bd19-760e1cd731ef>\",\"WARC-Concurrent-To\":\"<urn:uuid:bb9c11ac-485b-4ce0-8953-72376e24f2ba>\",\"WARC-IP-Address\":\"176.9.3.186\",\"WARC-Target-URI\":\"https://help.scilab.org/docs/5.3.0/fr_FR/classmarkov.html\",\"WARC-Payload-Digest\":\"sha1:JXBIODHBLEZTDL32YVADVJHWD4IVPIUT\",\"WARC-Block-Digest\":\"sha1:7HB643KKDZGUJVOZAEG2WUDXWA63YKZG\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662522270.37_warc_CC-MAIN-20220518115411-20220518145411-00348.warc.gz\"}"}