algorithm_functions.logistic_simplex_transformation#

algorithm_functions.logistic_simplex_transformation(matrix: ndarray, initial_trans_matrix: ndarray, C: ndarray) ndarray#

Performs the complete transformation yielding a transition matrix.

The transformation is performed to transform a matrix in the unconstrained optimization space to a matrix in the stochastic matrix space. First, the logistic transformation is applied to the matrix and next the rows are normalised and scaled so that a transition matrix that takes the elements where C=0 into account is obtained. These elements receive the value of the initial transition matrix.

Parameters:
  • matrix (np.ndarray) – The matrix in the unconstrained space that is transformed. A copy of this matrix is created.

  • initial_trans_matrix (np.ndarray) – The initial transition matrix.

  • C (np.ndarray) – The binary adjustment matrix.

Returns:

X (np.ndarray) – The transformed matrix.