Fit SVR (RBF kernel)

Epsilon-Support Vector Regression. The free parameters in the model are C and epsilon. The implementation is based on libsvm. The fit time complexity is more than quadratic with the number of samples which makes it hard to scale to datasets with more than a couple of 10000 samples.

Usage:

  1. Start the algorithm from the Processing Toolbox panel.

  2. Select a training dataset or create one by clicking the processing algorithm icon, then click run.

    ../../../../_images/svrrbf.png

Parameters

Regressor [string]

Scikit-learn python code. See SVR, GridSearchCV, StandardScaler for information on different parameters.

Default:

from sklearn.pipeline import make_pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.preprocessing import StandardScaler
from sklearn.svm import SVR

svr = SVR()
param_grid = {'kernel': ['rbf'],
              'epsilon': [0.],
              'gamma': [0.001, 0.01, 0.1, 1, 10, 100, 1000],
              'C': [0.001, 0.01, 0.1, 1, 10, 100, 1000]}
tunedSVR = GridSearchCV(cv=3, estimator=svr, scoring='neg_mean_absolute_error', param_grid=param_grid)
regressor = make_pipeline(StandardScaler(), tunedSVR)
Training dataset [file]

Training dataset pickle file used for fitting the classifier. If not specified, an unfitted classifier is created.

Outputs

Output regressor [fileDestination]

Pickle file destination.

Command-line usage

>qgis_process help enmapbox:FitSvrRbfKernel:

----------------
Arguments
----------------

regressor: Regressor
    Default value:  from sklearn.pipeline import make_pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.preprocessing import StandardScaler
from sklearn.svm import SVR

svr = SVR()
param_grid = {'kernel': ['rbf'],
              'epsilon': [0.],
              'gamma': [0.001, 0.01, 0.1, 1, 10, 100, 1000],
              'C': [0.001, 0.01, 0.1, 1, 10, 100, 1000]}
tunedSVR = GridSearchCV(cv=3, estimator=svr, scoring='neg_mean_absolute_error', param_grid=param_grid)
regressor = make_pipeline(StandardScaler(), tunedSVR)
    Argument type:  string
    Acceptable values:
            - String value
            - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field
            - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression
dataset: Training dataset (optional)
    Argument type:  file
    Acceptable values:
            - Path to a file
outputRegressor: Output regressor
    Argument type:  fileDestination
    Acceptable values:
            - Path for new file

----------------
Outputs
----------------

outputRegressor: <outputFile>
    Output regressor