Fit LinearRegression

Ordinary least squares Linear Regression. LinearRegression fits a linear model with coefficients w = (w1, …, wp) to minimize the residual sum of squares between the observed targets in the dataset, and the targets predicted by the linear approximation.

Parameters

Regressor [string]

Scikit-learn python code. See LinearRegression for information on different parameters.

Default:

from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LinearRegression

linearRegression = LinearRegression()
regressor = make_pipeline(StandardScaler(), linearRegression)
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:FitLinearregression:

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

regressor: Regressor
    Default value:  from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LinearRegression

linearRegression = LinearRegression()
regressor = make_pipeline(StandardScaler(), linearRegression)
    Argument type:  string
    Acceptable values:
            - String value
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