Skip to content

Commit

Permalink
Revert changes in Data Anonymization article (#122)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
yusufuyanik1 authored Sep 21, 2023
1 parent 180b7a3 commit 8181c45
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions examples/hds/Example_Data_Anonymization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
]
},
{
Expand Down Expand Up @@ -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')"
]
},
{
Expand All @@ -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/')"
]
},
{
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 8181c45

Please sign in to comment.