Skip to content

Commit

Permalink
revise notebooks based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang committed Jan 11, 2024
1 parent 041897f commit 080d33b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
11 changes: 4 additions & 7 deletions tutorials/kernelshap_tabular_penguin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"<img width=\"150\" alt=\"Logo_ER10\" src=\"https://user-images.githubusercontent.com/3244249/151994514-b584b984-a148-4ade-80ee-0f88b0aefa45.png\">\n",
"\n",
"### Model Interpretation using KernelSHAP for penguin dataset classifier\n",
"This notebook demonstrates the use of DIANNA with the SHAP Kernel explainer tabular method on the penguins dataset."
"This notebook demonstrates the use of DIANNA with the SHAP Kernel explainer method for tabular data on the penguins dataset."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Colab setup"
"### Colab setup"
]
},
{
Expand Down Expand Up @@ -337,7 +337,6 @@
"\n",
" onnx_input = {input_name: data.astype(np.float32)}\n",
" pred_onnx = sess.run([output_name], onnx_input)[0]\n",
" pred_onnx\n",
" \n",
" return pred_onnx"
]
Expand All @@ -363,8 +362,6 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/home/yangliu/venv/dianna/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n",
"The default value of `n_init` will change from 10 to 'auto' in 1.4. Set the value of `n_init` explicitly to suppress the warning\n"
]
}
Expand All @@ -380,7 +377,7 @@
"metadata": {},
"source": [
"#### 4. Visualization\n",
"(TODO:) The output can be visualized with the DIANNA built-in visualization function. It shows the importance of each feature contributing to the prediction.\n",
"The output can be visualized with the DIANNA built-in visualization function. It shows the importance of each feature contributing to the prediction.\n",
"\n",
"The prediction is \"Gentoo\", so let's visualize the feature importance scores for \"Gentoo\".\n",
"\n",
Expand All @@ -389,7 +386,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand Down
11 changes: 4 additions & 7 deletions tutorials/kernelshap_tabular_weather.ipynb

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tutorials/lime_tabular_penguin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@
"\n",
" onnx_input = {input_name: data.astype(np.float32)}\n",
" pred_onnx = sess.run([output_name], onnx_input)[0]\n",
" pred_onnx\n",
" \n",
" return pred_onnx"
]
Expand Down
1 change: 0 additions & 1 deletion tutorials/lime_tabular_weather.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@
"\n",
" onnx_input = {input_name: data.astype(np.float32)}\n",
" pred_onnx = sess.run([output_name], onnx_input)[0]\n",
" pred_onnx\n",
" \n",
" return pred_onnx"
]
Expand Down

0 comments on commit 080d33b

Please sign in to comment.