PREDICT_SVM_CLASSIFIER
Uses an SVM model to predict class labels for samples in an input relation, and returns the predicted value as a FLOAT data type.
Syntax
PREDICT_SVM_CLASSIFIER (input‑columns USING PARAMETERS model_name='model‑name' [, match_by_pos=match‑by‑position] [, type='return‑type'] [, cutoff='cutoff‑value'] ] )
Arguments
input‑columns | Comma-separated list of columns to use from the input relation, or asterisk (*) to select all columns. |
Parameter Settings
Parameter name | Set to… |
---|---|
model_name
|
Name of the model (case-insensitive) |
match_by_pos
|
Boolean value that specifies how input columns are matched to model features:
|
type
|
A string that specifies the output to return for each input row, one of the following:
|
cutoff
|
Valid only if the Default: 0 |
Examples
=> SELECT PREDICT_SVM_CLASSIFIER (mpg,cyl,disp,wt,qsec,vs,gear,carb USING PARAMETERS model_name='mySvmClassModel') FROM mtcars;
PREDICT_SVM_CLASSIFIER
------------------------ 0 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 1 1 0 0 0 (32 rows)
This example shows how to use PREDICT_SVM_CLASSIFIER
on the mtcars
table, using the match_by_pos
parameter. In this example, column mpg
was replaced with the constant 40:
=> SELECT PREDICT_SVM_CLASSIFIER (40,cyl,disp,wt,qsec,vs,gear,carb USING PARAMETERS model_name='mySvmClassModel', match_by_pos ='true') FROM mtcars;
PREDICT_SVM_CLASSIFIER
------------------------ 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 (32 rows)