SVM_REGRESSOR

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_REGRESSOR ( 'model_name', 'input_relation', 'response_column', 'predictor_columns'
	           [USING PARAMETERS [exclude_columns='col1, col2, ... coln',]
                                    [error_tolerance = value,]
                                    [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 input_relation that represents the dependent variable, or outcome.

Valid Types:

  • FLOAT
  • INT
  • NUMERIC
predictor_columns

A comma-separated list of the columns in input_relation that represent the independent variables for the model.

Valid Types:

  • FLOAT
  • INT
  • NUMERIC

If the column name contains special characters, it must use double quotes.

Parameters

exclude_columns='col1, col2, ... coln'

(Optional) The columns from input_relation that you want to exclude from the input_columns argument.

Default Value: Empty

error_tolerance=value

(Optional) Defines the acceptable error margin. Any data points outside this region add a penalty to the cost function.

Default Value: 1.0

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_REGRESSOR, 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_REGRESSOR function on the faithful table:

=> SELECT SVM_REGRESSOR('mySvmRegModel', 'faithful', 'eruptions', 'waiting'
                          USING PARAMETERS error_tolerance=0.1, max_iterations=100);
SVM_REGRESSOR
----------------------------------------------------------------
Finished in 5 iterations.
Accepted Rows: 272  Rejected Rows: 0
(1 row)

See Also