Creating BQML models
The BigQuery function that’s used to initiate model creation is aptly called CREATE
. In this section, we’ll look at the options available to a user when they’re creating different types of BQML models using the CREATE
function. You don’t necessarily need to read through the details of every single model at the moment. This should be used more as a reference, as needed.
Linear or logistic regression models
The following is the syntax for creating regression models, along with the different required and optional arguments you need to provide as part of the query:
{CREATE OR REPLACE MODEL} model_name [OPTIONS(MODEL_TYPE = { 'LINEAR_REG' | 'LOGISTIC_REG' }, INPUT_LABEL_COLS = string_array, OPTIMIZE_STRATEGY = { 'AUTO_STRATEGY' }, L1_REG = float64_value, L2_REG = float64_value, ...