PREDICT_SVM_REGRESSOR

Applies an SVM model on an input table or view.

Important: Before using a machine learning function, be aware that all the ongoing transactions might be committed.

Syntax

PREDICT_SVM_REGRESSOR(input_columns
	      USING PARAMETERS model_name='model_name'
                              [, match_by_pos = 'method']) 

Arguments

input_columns

A comma-separated list of the columns to be used for prediction.

Parameters

model_name='model_name'

The name of the model. Model names are case-insensitive.

match_by_pos= 'method'

(Optional) Valid Values:

  • false (default): Input columns will be matched to features in the model based on their names.

  • true: Input columns will be matched to features in the model based on their position in the list of indicated input columns.

Return

Return data type: FLOAT

Returns the predicted value.

Examples

This example shows how you can use the PREDICT_SVM_REGRESSOR function on the faithful table:

=> SELECT PREDICT_SVM_REGRESSOR(waiting USING PARAMETERS model_name='mySvmRegModel')
           FROM faithful ORDER BY id;
 PREDICT_SVM_REGRESSOR
--------------------
   4.06488248694445
   2.30392277646291 
   3.71269054484815
   2.867429883817
   4.48751281746003
   2.37436116488217
   4.69882798271781
   4.48751281746003
   2.09260761120512
.
.
.
 (272 rows)

This example shows how you can use the PREDICT_SVM_REGRESSOR function on the faithful table, using the match_by_pos parameter. Note that you can any of the column inputs with a constant that does not match an input column. In this example, the waiting column was replaced with the constant 40:

=> SELECT PREDICT_SVM_REGRESSOR(40 USING PARAMETERS model_name='mySvmRegModel', match_by_pos = 'true')
           FROM faithful ORDER BY id;
 PREDICT_SVM_REGRESSOR
--------------------
   1.31778533859324
   1.31778533859324
   1.31778533859324 
   1.31778533859324
   1.31778533859324
   1.31778533859324
   1.31778533859324
   1.31778533859324
   1.31778533859324
.
.
.
 (272 rows)

See Also