Created
January 7, 2024 01:28
-
-
Save smzn/0e446b57c012b5214c47ff41ec25fedb to your computer and use it in GitHub Desktop.
各行の合計で各要素を割って推移確率行列を作成
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 各行の合計で各要素を割って推移確率行列を作成 | |
transition_probability_matrix = filtered_matrix.div(filtered_matrix.sum(axis=1), axis=0) | |
# 結果を表示 | |
transition_probability_matrix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment