Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions jupyter/trustyai/ubi9-python-3.12/test/test_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
"\n",
" def test_fairnessmetrics(self):\n",
" url_unbiased = \"https://raw.githubusercontent.com/opendatahub-io/notebooks/main/jupyter/trustyai/ubi9-python-3.11/test/income-unbiased.csv\"\n",
" nobias = pd.read_csv(url_unbiased, index_col=False)\n",
"\n",
" url_unbiased = \"income-unbiased.csv\"\n",
" nobias = pd.read_csv(url_unbiased, index_col=False)\n",
" nobias.groupby(['gender', 'income'])['income'].count()\n",
" nobias.groupby(['gender', 'income'])['income'].count().unstack().plot.bar()\n",
Expand All @@ -85,7 +83,7 @@
" print(\"On the test_fairness_metrics test case the statistical_parity_difference score for this dataset is between the threshold [-0.1,0.1], which classifies the model as reasonably fair.\")\n",
"\n",
" def test_datafairness(self):\n",
" url_biased = \"https://raw.githubusercontent.com/opendatahub-io/notebooks/main/jupyter/trustyai/ubi9-python-3.11/test/income-biased.csv\"\n",
" url_biased = \"income-biased.csv\"\n",
" bias = pd.read_csv(url_biased, index_col=False)\n",
"\n",
" # Perform the data manipulations\n",
Expand Down
Loading