SVM_CLASSIFIER
Trains the SVM model on an input table or view. You can view the model using SUMMARIZE_MODEL.
Important: Before using a machine learning function, be aware that all the ongoing transactions might be committed.
Syntax
SVM_CLASSIFIER ( 'model_name', 'input_relation', 'response_column', 'predictor_columns' [USING PARAMETERS [exclude_columns='col1, col2, ... coln',] [C='value',] [epsilon='value',] [max_iterations='value'] ] )
Arguments
model_name |
The name of the model. Model names are case-insensitive. |
input_relation |
The table or view that contains the training data. |
response_column |
The name of the column in Valid Types:
|
predictor_columns |
A comma-separated list of the columns in Valid Types:
If the column name contains special characters, it must use double quotes. |
Parameters
exclude_columns='col1, col2, ... coln' |
(Optional) The columns from Default Value: Empty |
C='value' |
(Optional) Sets the weight for misclassification cost. The algorithm minimizes the regularization cost and the misclassification cost. Default Value: 1.0 |
epsilon='value' |
(Optional) Used to control accuracy. Default Value: 1e-3 |
max_iterations='value' |
(Optional) Determines the maximum number of iterations that the algorithm performs before achieving the specified accuracy result. Default Value: 100 |
Privileges
To use SVM_CLASSIFIER, you must either be a superuser or have CREATE privileges for the schema of the output view and SELECT privileges for the input table or view. There are no privileges needed on the function itself.
See GRANT (Schema) and GRANT (Table).
Examples
This example shows how you can use the SVM_CLASSIFIER function on the mtcars table:
=> SELECT SVM_CLASSIFIER('mySvmClassModel', 'mtcars', 'am', 'mpg,cyl,disp,hp,drat,wt,qsec,vs,gear,carb' USING PARAMETERS exclude_columns = 'hp,drat');
SVM_CLASSIFIER
---------------------------------------------------------------- Finished in 15 iterations. Accepted Rows: 32 Rejected Rows: 0 (1 row)