Skip to content

Commit

Permalink
fix: Update TARGET_FEATURES to TARGET_FEATURE in EDA notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
SverreNystad committed Mar 29, 2024
1 parent ba3861b commit 29301a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
29 changes: 14 additions & 15 deletions eda/autoviz.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"\n",
"os.getcwd()\n",
"\n",
"from src.config import REPORT_PATH, FIGURE_PATH, TARGET_FEATURES\n",
"from src.config import REPORT_PATH, FIGURE_PATH, TARGET_FEATURE\n",
"from src.data.data_loader import create_data_loader"
]
},
Expand Down Expand Up @@ -83,22 +83,21 @@
"source": [
"AV = AutoViz_Class()\n",
"\n",
"for target_variable in TARGET_FEATURES:\n",
"\n",
" custom_plot_dir = FIGURE_PATH\n",
"custom_plot_dir = FIGURE_PATH\n",
"\n",
" dft = AV.AutoViz(\n",
" \"\", # Empty string for filename to signal that we are passing a dataframe\n",
" sep=\",\",\n",
" depVar=target_variable,\n",
" dfte=training_data,\n",
" verbose=2,\n",
" lowess=False,\n",
" chart_format=\"html\",\n",
" max_rows_analyzed=150000,\n",
" max_cols_analyzed=training_data.shape[1],\n",
" save_plot_dir=custom_plot_dir\n",
" )"
"dft = AV.AutoViz(\n",
" \"\", # Empty string for filename to signal that we are passing a dataframe\n",
" sep=\",\",\n",
" depVar=TARGET_FEATURE,\n",
" dfte=training_data,\n",
" verbose=2,\n",
" lowess=False,\n",
" chart_format=\"html\",\n",
" max_rows_analyzed=150000,\n",
" max_cols_analyzed=training_data.shape[1],\n",
" save_plot_dir=custom_plot_dir\n",
")"
]
}
],
Expand Down
7 changes: 3 additions & 4 deletions eda/sweetviz.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"\n",
"os.getcwd()\n",
"\n",
"from src.config import REPORT_PATH, TARGET_FEATURES\n",
"from src.config import REPORT_PATH, TARGET_FEATURE\n",
"from src.data.data_loader import create_data_loader"
]
},
Expand Down Expand Up @@ -80,9 +80,8 @@
"metadata": {},
"outputs": [],
"source": [
"for feature_name in TARGET_FEATURES:\n",
" report = sv.analyze(training_data, target_feat=feature_name)\n",
" report.show_html(f\"{REPORT_PATH}sweetviz_{feature_name}.html\")"
"report = sv.analyze(training_data, target_feat=TARGET_FEATURE)\n",
"report.show_html(f\"{REPORT_PATH}sweetviz_{TARGET_FEATURE}.html\")"
]
}
],
Expand Down

0 comments on commit 29301a9

Please sign in to comment.