Skip to content

PREDICT

1. PREDICT Statement

The "PREDICT" statement allows users to apply models to perform prediction, classification, recommendation, and more.

2. PREDICT Syntax

query_statement:
    query_expr

PREDICT USING (model_name_expression)
OPTIONS (
    expression [ , ...]
    )
AS
(query_expr)

3. PREDICT Example

Note

  • Examples are specific to one model, and the required option values ​​or the dataset used may differ from model to model. For a detailed description of each model, refer to the ThanoSQL Model Statement Reference
  • Because the example only works when a specific model and dataset are present, it may not run normally if copied and used as is.
%%thanosql
PREDICT USING my_product_classifier
OPTIONS (
    image_col='image_path',
    result_col='predict_result'
    )
AS
SELECT *
FROM product_image_test

AI Models That Can Be Used with 'PREDICT Statement'

  • AutoML Classification model - AutomlClassifier
  • AutoML Regression model - AutomlRegressor
  • ConvNeXT Model - ConvNeXt_Tiny, ConvNeXt_Base
  • EfficientNet Model - EfficientNetV2S, EfficientV2M
  • Albert Model - AlbertKo, AlbertEn
  • Electra Model - ElectraKo, ElectraEn
  • Wav2Vec2 Model - Wav2Vec2Ko, Wav2Vec2En
  • Whisper Model - Whisper
  • ViLT Model - ViLT
  • TFT Model - TFT

Last update: 2023-08-09