Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
Open
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
9 changes: 4 additions & 5 deletions conditional-generation/conditional-generation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@
"source": [
"from mostlyai import MostlyAI\n",
"import pandas as pd\n",
"from sklearn.model_selection import train_test_split\n",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see this used anywhere so probably no need for it to be imported.

"\n",
"# fetch original data\n",
"df = pd.read_csv('https://github.com/mostly-ai/public-demo-data/raw/dev/census/census.csv.gz')\n",
Expand Down Expand Up @@ -1621,7 +1620,7 @@
"source": [
"### Explore Synthetic Data\n",
"\n",
"Let's compare the price distribution across Manhatten. Note again, that while the locations in the partially synthetic data are actual locations, all other attributes, incl. the price per night, are randomly sampled by the generative model. Still, these prices are again statistically representative given the context, i.e. the location within Manhattan."
"Let's compare the price distribution across Manhattan. Note again, that while the locations in the partially synthetic data are actual locations, all other attributes, incl. the price per night, are randomly sampled by the generative model. Still, these prices are again statistically representative given the context, i.e. the location within Manhattan."
]
},
{
Expand Down Expand Up @@ -1654,7 +1653,7 @@
],
"source": [
"%%capture --no-display\n",
"def plot_manhatten(df, title):\n",
"def plot_manhattan(df, title):\n",
" ax = df_orig.plot.scatter(\n",
" x='longitude', \n",
" y='latitude', \n",
Expand All @@ -1667,8 +1666,8 @@
" ax.set_title(title)\n",
" plt.show()\n",
" \n",
"plot_manhatten(df_orig, 'Original Data')\n",
"plot_manhatten(syn_partial, 'Partially Synthetic Data')"
"plot_manhattan(df_orig, 'Original Data')\n",
"plot_manhattan(syn_partial, 'Partially Synthetic Data')"
]
},
{
Expand Down