PREDICT(<MODEL>, <TABLE>): This operation returns predictions and confidence scores for each row in <TABLE> based on running <MODEL>.

This is a table-valued function (TVF). It should be used in a FROM clause. The input model should already exist (see CREATE MODEL. The input table should match the columns used to train the input model (the target column can be ommitted).

Syntax

SELECT <COLUMNS> FROM PREDICT(<MODEL>, <TABLE>);

Args

MODEL
model or str (literal)

The name of the trained model to use for inference.

TABLE
table or str (literal)

The name of the table over which to compute model predictions.

Examples

CREATE MODEL my_model AS SELECT * FROM train_data;
SELECT * FROM PREDICT(my_model, predict_data);