Linear Regression is the simplest regression model in machine learning. The principle is to find a straight line to fit the relationship between sample characteristics and sample output labels to the greatest extent. The calculation is simple, the result is easy to understand, and the prediction problem of continuous data is solved.
The data training procedure of the linear regression method is carried out by the method, and a model can be obtained according to the data characteristics, and then the model is used for prediction.
Training Dataset: Required parameter. The dataset to be trained accesses connection info, including data type, connect parameter, dataset name, etc. That can connect HBase data, dsf data, and local data.
Data Query Conditions: Optional parameter; the specified data can be filtered out for corresponding analysis according to the Query Conditions; attribute conditions and spatial query are supported. Such as SmID<100 and BBOX(the_geom, 120,30,121,31)。
Explanatory Fields: Required parameter, the field of the explanatory variable. Enter one or more explanatory fields of the training dataset as the independent variables of the model, which can help predict the results.
Modeling Field: Required parameter, which is used to train the field of the model, that is the dependent variable. This field corresponds to a known (trained) value of a variable that will be used to make predictions at unknown locations.
Maximum Iterations: Optional parameter, value range >0. Default is 100.
Regularization Parameter: Optional parameter, value range ≥ 0, default value is 0.0. It is mainly used to prevent overfitting.
Selection of Regularization Mode: Optional parameters, mainly used to alleviate the overfitting problem of the model. 0.0 is L2 regularization, 1.0 is L1 regularization, the range of values is [0.0,1.0], and the default value is 0.0.
Distance Explanatory Variable Dataset: Optional parameter, supports point, line and region dataset, calculates the closest distance between the elements of the given dataset and the elements in the training dataset, and automatically creates a list of explanatory variables.
Model Save Directory: Optional parameter, save the model with good training result to this address. If it is empty, the model will not be saved.
IBModelCharacteristics: Properties of a linear regression model.
Variable: The field array of the linear regression model, which refers to the field of the independent variable in the training model.
MSE: mean square error, the mean of the squared error between the predicted value and the true value.
RMSE: the mean of the square root of the error between the predicted value and the true value.
Mae: mean absolute error, the mean of the absolute value of the error between the predicted value and the true value.
R2: coefficient of determination. According to the value of R2, the quality of the model can be judged. The value range is [0,1]. Generally speaking, the larger the r2 is, the better the fitting effect of the model is. r2 reflects how accurate it is, because with the increase of the number of samples, r2 will inevitably increase, which can not really quantitatively explain the degree of accuracy, but can only be roughly quantitative.
explained Variance: explains the variance.
numIterations: Actual iterations.