2 次代码提交 195cb41380 ... 5761593f61

作者 SHA1 备注 提交日期
  Ali 5761593f61 Mise à jour du rapport 2 年之前
  Ali 5b7cbee370 Mise à jour de la visualisation 2 年之前
共有 4 个文件被更改,包括 9105 次插入20 次删除
  1. 9 9
      Project_Report.html
  2. 9 9
      Project_Report.ipynb
  3. 9082 0
      Project_Report_no_input.html
  4. 5 2
      bop_scripts/visualisation.py

文件差异内容过多而无法显示
+ 9 - 9
Project_Report.html


文件差异内容过多而无法显示
+ 9 - 9
Project_Report.ipynb


文件差异内容过多而无法显示
+ 9082 - 0
Project_Report_no_input.html


+ 5 - 2
bop_scripts/visualisation.py

@@ -60,7 +60,7 @@ def plot_missing_outcome(X, y, features, labels, figsize=(20,10)):
             pd.DataFrame(Xy[features].isna().astype("int").sum(axis=1))
         ).rename(columns={0:"n_NA"}) \
         .groupby("n_NA") \
-        .agg(lambda x: x.sum()/x.count())
+        .agg(lambda x: x.sum()/x.count())*100
 
     fig,ax = plt.subplots(1, 1, figsize=figsize)
     sns.lineplot(
@@ -73,6 +73,7 @@ def plot_missing_outcome(X, y, features, labels, figsize=(20,10)):
 
     ax.set_xlabel("Nombre de valeurs manquantes")
     ax.set_ylabel("Pourcentage d'examen prescrit")
+    ax.set_ylim(0,100)
     ax.set_title("% de prescription de bilans en fonction du nombre de variables manquantes")
 
 def plot_missing_bar(X, features, figsize=(15,10)):
@@ -88,7 +89,8 @@ def plot_missing_bar(X, features, figsize=(15,10)):
 
     fig, ax = plt.subplots(1,1, figsize=figsize)
 
-    data = (X[features].isna()*1).mean().reset_index()
+    data = ((X[features].isna()*1).mean()*100).reset_index()
+
     sns.barplot(
         data=data,
         x="index",
@@ -98,6 +100,7 @@ def plot_missing_bar(X, features, figsize=(15,10)):
 
     ax.set_title("% de valeurs manquantes par variable")
     ax.set_xlabel("Variable")
+    ax.set_ylim(0,100)
     ax.set_ylabel("% de valeurs manquantes")
 
 def plot_correlation(X, features, figsize=(10,6)):

部分文件因为文件数量过多而无法显示