pyfan.stats.markov.transprobcheck.markov_condi_prob2one

pyfan.stats.markov.transprobcheck.markov_condi_prob2one(mt_trans)[source]

Rescale markov transitions rows to sum to 1

Suppose each transition matrix row sums up to slighly less than one, rescale so it sums to one.

Parameters
mt_transnumpy.array of shape (N, N)

The AR1 transition matrix, each row is a state, each value in each row is the conditional probability of moving from state i (row) to state j (column)

Returns
ndarray

The rescaled numpy array