Skip to content

Commit dbca9aa

Browse files
merla18sirtorry
authored andcommitted
updated for the Jupyter support (#2337)
1 parent e4a9920 commit dbca9aa

File tree

1 file changed

+9
-5
lines changed
  • tables/automl/notebooks/purchase_prediction

1 file changed

+9
-5
lines changed

tables/automl/notebooks/purchase_prediction/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ You can access the data on BigQuery [here](https://bigquery.cloud.google.com/dat
2727
## Solution Walkthrough
2828
The solution has been developed using [Google Colab Notebook](https://colab.research.google.com/notebooks/welcome.ipynb). Here are the thought process and specific steps that went into building the “Purchase Prediction with AutoML Tables” colab. The colab is broken into 7 parts; this write up will mirror that structure.
2929

30-
Before we dive in, a few housekeeping notes about setting up the colab.
30+
Before we dive in, a few housekeeping notes about setting up the colab or Jupyter.
3131

3232

3333
Steps Involved
3434

3535
### 1. Set up
36+
37+
**If you are using AI Platform Notebooks**, your environment is alreadyauthenticated. Skip this step.
38+
3639
The first step in this process was to set up the project. We referred to the [AutoML tables documentation](https://cloud.google.com/automl-tables/docs/) and take the following steps:
3740
* Create a Google Cloud Platform (GCP) project
3841
* Enable billing
@@ -44,6 +47,7 @@ There are a few options concerning how to host the colab: default hosted runtime
4447
##### Default Hosted Runtime:
4548

4649
The hosted runtime is the simplest to use. It accesses a default VM already configured to host the colab notebook. Simply navigate to the upper right hand corner click on the connect drop down box, which will give you the option to “connect to hosted runtime”.
50+
Alternatively you can use the [AI Platform Notebooks] (https://cloud.google.com/ai-platform-notebooks/).
4751

4852
##### Local Runtime:
4953
The local runtime takes a bit more work. It involves downloading jupyter notebooks onto your local machine, likely the desktop from which you access the colab. After downloading jupyter notebooks, you can connect to the local runtime. The colab notebook will run off of your local machine. Detailed instructions can be found [here](https://research.google.com/colaboratory/local-runtimes.html).
@@ -64,12 +68,12 @@ Once your firewall rules are created, you should be able to ssh into your VM ins
6468
This will allow your local terminal to ssh into the VM instance you created, which simultaneously port forwarding the port 8888 from your local machine to the VM. Once in the VM, you can download jupyter notebooks and open up a notebook as seen in the instructions [here](https://research.google.com/colaboratory/local-runtimes.html). Specifically steps 2, 3.
6569

6670
We recommend hosting using the VM for two main reasons:
67-
1. The VM can be provisioned to be much, much more powerful than either your local machine or the default runtime allocated by the colab notebook.
68-
2. The colab is currently configured to run on either your local machine or a VM. It requires you to install the AutoML client library and uplaod a service account key to the machine from which you are hosting the colab. These two actions can be done the default hosted runtime, but would require a different set of instructions not detailed in this specific colab. To see them, refer to the AutoML Tables sample colab found in the tutorials section of the [documentation](https://cloud.google.com/automl-tables/docs/). Specifically step 2.
71+
1. The VM can be provisioned to be much, much more powerful than either your local machine or the default runtime allocated by the notebook.
72+
2. The notebook is currently configured to run on either your local machine or a VM. It requires you to install the AutoML client library and uplaod a service account key to the machine from which you are hosting the notebook. These two actions can be done the default hosted runtime, but would require a different set of instructions not detailed in this specific colab. To see them, refer to the AutoML Tables sample colab found in the tutorials section of the [documentation](https://cloud.google.com/automl-tables/docs/). Specifically step 2.
6973

7074

7175
### 2. Initialize and authenticate
72-
The client library installation is entirely self explanatory in the colab.
76+
The client library installation is entirely self explanatory in the notebook.
7377

7478
The authentication process is only slightly more complex: run the second code block entitled "Authenticate using service account key and create a client" and then upload the service account key you created in the set up step
7579
Would also recommend setting a global variable
@@ -126,4 +130,4 @@ These parts are mostly self explanatory.
126130
Note that we trained on the first 9 months of data and we validate using the last 3.
127131

128132
### 8. Evaluate your Prediction
129-
In this section, we take our validation data prediction results and plot the Precision Recall Curve and the ROC curve of both the false and true predictions.
133+
In this section, we take our validation data prediction results and plot the Precision Recall Curve and the ROC curve of both the false and true predictions.

0 commit comments

Comments
 (0)