From 2561958c588ca0a8405b5c716522c0699c586026 Mon Sep 17 00:00:00 2001 From: workpc Date: Tue, 5 Nov 2024 14:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=94=E6=B3=A1=E5=9B=BE=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/nerulforcastmodels.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/nerulforcastmodels.py b/models/nerulforcastmodels.py index 365e788..c988a45 100644 --- a/models/nerulforcastmodels.py +++ b/models/nerulforcastmodels.py @@ -631,7 +631,7 @@ def brent_export_pdf(num_indicators=475,num_models=21, num_dayindicator=202,inpu df_zhibiaoshuju = data.copy() # 气泡图用 # 绘制特征相关气泡图 - content.append(Graphs.draw_text('气泡图中,横轴为指标名称,纵轴为指标名称,面积越大表示相关性越大,面积越小表示相关性越小。')) + grouped = df_zhibiaofenlei.groupby('指标分类') grouped_corr = pd.DataFrame(columns=['指标分类', '指标数量', '相关性总和']) @@ -705,6 +705,7 @@ def brent_export_pdf(num_indicators=475,num_models=21, num_dayindicator=202,inpu plt.savefig(os.path.join(dataset, '指标分类相关性总和的气泡图.png'), bbox_inches='tight') plt.close() content.append(Graphs.draw_img(os.path.join(dataset,'指标分类相关性总和的气泡图.png'))) + content.append(Graphs.draw_text('气泡图中,横轴为指标分类,纵轴为指标分类下的特征数量,气泡的面积越大表示该分类中特征的相关系数和越大。')) logger.info(f'绘制相关性总和的气泡图结束')