Skip to content

Commit ca880dc

Browse files
gPS Teamcopybara-github
authored andcommitted
Updated propensity data preprocessing with module upgrade.
PiperOrigin-RevId: 837420207 Change-Id: I385e8a02e97d1a739bdf13a409c82d067e0740ef
1 parent 9fb9f86 commit ca880dc

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

packages/propensity/03.ml_data_preprocessing.ipynb

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@
5959
"### Install and import required modules"
6060
]
6161
},
62+
{
63+
"metadata": {
64+
"id": "m3LGUDp6amuB"
65+
},
66+
"cell_type": "code",
67+
"source": [
68+
"%pip install --upgrade nbformat"
69+
],
70+
"outputs": [],
71+
"execution_count": null
72+
},
6273
{
6374
"cell_type": "code",
6475
"execution_count": null,
@@ -364,7 +375,7 @@
364375
"dataset = bq_utils.client.create_dataset(PROJECT_ID + '.' + DATASET_NAME,\n",
365376
" exists_ok=True)\n",
366377
"console_url = 'https://console.cloud.google.com/bigquery?project='\n",
367-
"print(f'{console_url}{PROJECT_ID}\u0026p={PROJECT_ID}\u0026d={DATASET_NAME}\u0026page=dataset')"
378+
"print(f'{console_url}{PROJECT_ID}&p={PROJECT_ID}&d={DATASET_NAME}&page=dataset')"
368379
]
369380
},
370381
{
@@ -560,7 +571,7 @@
560571
" Negatives\n",
561572
" WHERE\n",
562573
" -- Sampling the negatives using predefined proportion.\n",
563-
" rand_seed \u003c= (\n",
574+
" rand_seed <= (\n",
564575
" SELECT\n",
565576
" CAST(ratio_positive_to_negative AS float64)\n",
566577
" FROM\n",
@@ -640,9 +651,7 @@
640651
"id": "aaGTphZaSq8k"
641652
},
642653
"outputs": [],
643-
"source": [
644-
""
645-
]
654+
"source": []
646655
}
647656
],
648657
"metadata": {

0 commit comments

Comments
 (0)