From 8181c458e45780c96c50975579407f409e68648c Mon Sep 17 00:00:00 2001 From: yusufuyanik1 <54443450+yusufuyanik1@users.noreply.github.com> Date: Thu, 21 Sep 2023 11:37:07 +0200 Subject: [PATCH] Revert changes in Data Anonymization article (#122) * set default top_n to 20 for heatmap * Hide Advanced: Hash fuctions in Data Anonymization notebook - Hide the last 2 cells for now because they don't work as expected (maps all predictors as symbolic) - Changed the way we get the path of SampleHDS.json. I think this way it is more understandable. * revert changes in Data_Anon article * Update Example_Data_Anonymization.ipynb --- examples/hds/Example_Data_Anonymization.ipynb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/hds/Example_Data_Anonymization.ipynb b/examples/hds/Example_Data_Anonymization.ipynb index 0c1815c5..efb50a30 100644 --- a/examples/hds/Example_Data_Anonymization.ipynb +++ b/examples/hds/Example_Data_Anonymization.ipynb @@ -27,10 +27,11 @@ "\n", "import os \n", "import sys\n", + "import plotly.io as pio\n", + "pio.renderers.default = \"notebook_connected\"\n", "\n", - "current_dir = os.getcwd() \n", - "base_dir = os.path.dirname(os.path.dirname(current_dir)) \n", - "sys.path.append(base_dir) " + "sys.path.append(\"../../../\")\n", + "sys.path.append('../../python')" ] }, { @@ -60,8 +61,7 @@ "metadata": {}, "outputs": [], "source": [ - "json_file_path = os.path.join(base_dir, 'data', 'SampleHDS.json') \n", - "pl.read_ndjson(json_file_path)" + "pl.read_ndjson('../../../../data/SampleHDS.json')" ] }, { @@ -78,8 +78,7 @@ "metadata": {}, "outputs": [], "source": [ - "hds_path = os.path.join(base_dir, 'data') \n", - "anon = DataAnonymization(hds_folder=hds_path, sample_percentage_schema_inferencing=0.99)" + "anon = DataAnonymization(hds_folder='../../../../data/')" ] }, { @@ -160,7 +159,7 @@ "outputs": [], "source": [ "anon = DataAnonymization(\n", - " hds_folder=hds_path,\n", + " hds_folder=\"../../../../data/\",\n", " mask_ih_names=False,\n", " mask_outcome_values=False,\n", " mask_context_key_values=False,\n",