oraclesai.regression.SpatialLagRegressor
- class SpatialLagRegressor(spatial_weights_definition=None)
The Spatial Lag regression model considers spatial dependence over the target variable, meaning that the value of a region’s target variable is related to its neighbors’ target variable. The Spatial Lag model includes the spatial lag of the dependent variable into the linear equation; this results in an extra parameter associated with the spatial lag of the dependent variable
- Parameters:
spatial_weights_definition – SpatialWeightsDefinition, default=None. Specifies the spatial relationship among neighbors.
Methods
__init__
([spatial_weights_definition])fit
(X, y[, geometries, crs, spatial_weights])Trains the model using the training dataset.
get_params
([deep])Get parameters for this estimator.
predict
(X[, geometries])Estimates the target variable for the given data.
score
(X, y[, sample_weight, geometries])Returns the value of the regression score function or R-Squared.
set_params
(**params)Set the parameters of this estimator.
Attributes
- returns:
An array with the estimated parameters of the trained model
- returns:
A SpatialDiagnostics instance containing statistics of the trained model. If no
- returns:
The number of variables for which coefficients are estimated (including the
- returns:
The regression model defined
- returns:
An array with the predictions for the training data
- returns:
The summary of the trained model
- returns:
An array with the residuals of the trained model