Created
January 8, 2024 02:11
-
-
Save smzn/b79f015a55e4324e45c92be46b873d9f 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
import matplotlib.pyplot as plt | |
import seaborn as sns | |
# Set the size of the heatmap | |
plt.figure(figsize=(20, 15)) | |
# Adjust the heatmap color mapping to use red for high values and white for low values | |
plt.figure(figsize=(20, 15)) | |
sns.heatmap(transition_probability_matrix.iloc[:, 1:], cmap='Reds') | |
plt.title('Transition Probability Matrix Heatmap') | |
plt.xlabel('Destination Station') | |
plt.ylabel('Start Station') | |
# Display the heatmap | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment