BigQuery Machine Learning in Analytics
You can use your trained machine learning models data from BigQuery in Analytics. Get better insights than ever! Just choose BigQuery as your data source for building a visualization, and use the integration to connect to a trained machine learning model.
For example, you may have a machine learning (ML) model that is trained to predict the credit risk for a bank's clients, using specific information about the clients. This ML model can be used in Analytics to build a visualization giving insight about how the clients' housing type relates to their credit risk:
Prerequisites
To use the BigQuery Machine Learning integration in Analytics, you need to connect to a BigQuery data source account, where you have a trained machine learning model.
Accessing BigQuery Machine Learning Integration
To access the BigQuery Machine Learning Integration, follow the steps below:
Connect to a BigQuery data source. Select the dataset, which contains information necessary for your machine learning model predictions.
Please, refer to the Google BigQuery topic for more information on the BigQuery data source.
In the Visualization editor, click/tap on the brain icon located at the top of the Fields list to the left.
Connecting to Your Machine Learning model
To connect to your BigQuery machine learning model you need to do the following:
Select from your trained BigQuery models in the dialog that opens:
The next dialog requires you to map the data loaded in Analytics to the input expected by your ML model.
In the dialog above you have the following columns to consider:
a. Input - on the left you see the kind of data the model requires in order to calculate the output information (e.g. Duration). On the right, you need to select the fields in your dataset (e.g. Duration_in_months) that match the requested data on the left. Analytics automatically matches all fields from the loaded BigQuery dataset, which share the same name with the model's requested data.
b. Output - choose the information you want calculated (predicted) by the model. The result will appear as new fields in the Visualization editor, under From (name of the model), e.g. From credit_risk_model.
c. (Optional) Parameters - some of your BigQuery models may require you to fill in values for the parameters they need to calculate the output. In this case you will see a third Parameters column between Input and Output.
You can use the fields returned by the BigQuery model as regular fields in the Visualization editor.