# Re-importer les bibliothèques après la réinitialisation de l'environnement import matplotlib.pyplot as plt import seaborn as sns import pandas as pd # Données de probabilité de hausse data = [ [41.2, 45.2, 46.7, 49.4, 74.1, 67.8, 72.6, 77.2, 78.8, 75.5, 75.1], [41.9, 40.1, 41.6, 47.9, 61.7, 58.3, 66.2, 78.7, 76.6, 79.0, 78.6], [35.3, 38.6, 37.3, 45.9, 61.7, 67.8, 70.8, 81.0, 78.8, 78.0, 81.0], [29.5, 31.2, 33.4, 39.8, 58.2, 61.7, 69.1, 75.9, 81.2, 78.5, 72.3], [26.6, 30.1, 27.3, 34.6, 50.2, 58.0, 70.8, 73.6, 76.7, 73.6, 70.0], [32.7, 29.5, 28.6, 28.6, 43.5, 56.2, 65.3, 73.0, 71.9, 66.4, 71.4], [28.8, 27.1, 28.8, 26.2, 38.1, 46.7, 56.3, 65.4, 69.2, 71.2, 67.8], [30.4, 24.2, 24.6, 28.9, 32.5, 42.2, 51.2, 63.3, 67.8, 63.8, 66.0], [25.3, 24.7, 24.2, 24.7, 33.9, 44.4, 52.6, 63.8, 66.1, 67.0, 66.2], [20.2, 21.6, 24.8, 29.7, 32.8, 39.7, 53.9, 56.9, 61.3, 62.6, 64.5], [14.6, 18.4, 23.2, 28.5, 25.3, 30.3, 48.1, 52.8, 58.1, 59.3, 59.9], ] rows = ['B5', 'B4', 'B3', 'B2', 'B1', 'N0', 'H1', 'H2', 'H3', 'H4', 'H5'] cols = ['B5', 'B4', 'B3', 'B2', 'B1', 'N0', 'H1', 'H2', 'H3', 'H4', 'H5'] df = pd.DataFrame(data, index=rows, columns=cols) # Affichage du heatmap plt.figure(figsize=(12, 9)) sns.heatmap(df, annot=True, fmt=".1f", cmap="coolwarm", cbar_kws={'label': 'Probabilité de hausse (%)'}) plt.title("Probabilité de hausse pour futur_percent_3h") plt.xlabel("mid_smooth_deriv1_1h_bin") plt.ylabel("sma24_diff_1h_bin") plt.tight_layout() plt.show()