You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tables/automl/notebooks/purchase_prediction/README.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -27,12 +27,15 @@ You can access the data on BigQuery [here](https://bigquery.cloud.google.com/dat
27
27
## Solution Walkthrough
28
28
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.
29
29
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.
31
31
32
32
33
33
Steps Involved
34
34
35
35
### 1. Set up
36
+
37
+
**If you are using AI Platform Notebooks**, your environment is alreadyauthenticated. Skip this step.
38
+
36
39
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:
37
40
* Create a Google Cloud Platform (GCP) project
38
41
* Enable billing
@@ -44,6 +47,7 @@ There are a few options concerning how to host the colab: default hosted runtime
44
47
##### Default Hosted Runtime:
45
48
46
49
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/).
47
51
48
52
##### Local Runtime:
49
53
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
64
68
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.
65
69
66
70
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.
69
73
70
74
71
75
### 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.
73
77
74
78
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
75
79
Would also recommend setting a global variable
@@ -126,4 +130,4 @@ These parts are mostly self explanatory.
126
130
Note that we trained on the first 9 months of data and we validate using the last 3.
127
131
128
132
### 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