Skip to content

Instantly share code, notes, and snippets.

@smzn
Created January 8, 2024 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smzn/b79f015a55e4324e45c92be46b873d9f to your computer and use it in GitHub Desktop.
Save smzn/b79f015a55e4324e45c92be46b873d9f to your computer and use it in GitHub Desktop.
ヒートマップ表示
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