Skip to content

Commit

Permalink
fix: update isolation forest notebook (#1696)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhamilton723 authored Oct 26, 2022
1 parent 9120b05 commit b257c70
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@
"shaps = (\n",
" shap_df.withColumn(\"shapValues\", vec2array(F.col(\"shapValues\").getItem(0)))\n",
" .select(\n",
" [\"shapValues\", \"outlierScore\"] + inputCols + [timestampColumn, \"prediction\"]\n",
" [\"shapValues\", \"outlierScore\"] + inputCols + [timestampColumn, \"predictedLabel\"]\n",
" )\n",
" .withColumn(\"sensor_1_localimp\", F.col(\"shapValues\")[1])\n",
" .withColumn(\"sensor_2_localimp\", F.col(\"shapValues\")[2])\n",
Expand Down Expand Up @@ -771,7 +771,7 @@
"\n",
"\n",
"def visualize(rdf):\n",
" anoms = list(rdf[\"prediction\"] == 1)\n",
" anoms = list(rdf[\"predictedLabel\"] == 1)\n",
"\n",
" fig = plt.figure(figsize=(26, 12))\n",
"\n",
Expand Down

0 comments on commit b257c70

Please sign in to comment.