Ask Your Question
3

Is it possible to use the create/replace command of Bigquery ML to perform multiple regressions with a single model?

asked 2023-07-18 19:32:40 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-07-18 19:43:02 +0000

pufferfish gravatar image

Yes, it is possible to use the create/replace command of Bigquery ML to perform multiple regressions with a single model. This can be done by specifying multiple inputs and targets in the same CREATE MODEL statement. For example:

CREATE or REPLACE MODEL mymodel
OPTIONS (
  model_type='linear_reg',
  input_label_cols=['input1', 'input2', 'input3'],
  output_label_cols=['target1', 'target2', 'target3']
) AS
SELECT input1, input2, input3, target1, target2, target3
FROM mytable

In this example, the model will be trained using three inputs (input1, input2, input3) and three targets (target1, target2, target3) from the same table.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-18 19:32:40 +0000

Seen: 11 times

Last updated: Jul 18 '23