Skip to content

Commit 45b3da5

Browse files
Fix reject H0 condition in MMD_advance.ipynb
1 parent 8368845 commit 45b3da5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/examples/data_drift/MMD_advance.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@
956956
" mmd, callbacks_logs = detector.compare(X=sample)\n",
957957
" permutation_test_logs[type_] = copy.copy(callbacks_logs[\"permutation_test\"])\n",
958958
" mmd, p_value = mmd.distance, callbacks_logs[\"permutation_test\"][\"p_value\"]\n",
959-
" print(f\"{type_}:\\n MMD statistic={round(mmd, 4)}, p-value={round(p_value, 4)}, drift={p_value < alpha}\")"
959+
" print(f\"{type_}:\\n MMD statistic={round(mmd, 4)}, p-value={round(p_value, 4)}, drift={p_value <= alpha}\")"
960960
],
961961
"metadata": {
962962
"collapsed": false,
@@ -1014,7 +1014,7 @@
10141014
" ax.plot(xs, permutation_tests_density, label=\"KDE\")\n",
10151015
" ax.axvline(observed_statistic, color=\"green\", linestyle=\"--\", label=\"Observed distance\")\n",
10161016
" ax.set_title(type_)\n",
1017-
" drift = p_value < alpha\n",
1017+
" drift = p_value <= alpha\n",
10181018
" ax.text(0.88, 0.15, \"Drift\" if drift else \"No drift\", transform=ax.transAxes, fontsize=12, bbox={\"boxstyle\": \"round\", \"facecolor\": \"red\" if drift else \"green\", \"alpha\":0.5})\n",
10191019
"\n",
10201020
" # Get the y limit\n",

0 commit comments

Comments
 (0)