oraclesai.regression.SpatialAdaptiveRegressor
- class SpatialAdaptiveRegressor(spatial_weights_definition=None)
Consists of an automated approach that finds the regression algorithm that better fits the data. From spatial diagnostics, the algorithm gets the Moran’s I. A positive value of Moran’s I indicate the presence of spatial dependence, or spatial clustering, and an algorithm that includes this spatial dependence is preferred. If the Moran’s is negative, it indicates the presence of regional variance or spatial heteroskedasticity, and a local method is more suitable. If the parameter
spatial_weights_definition
is not specified, it suggests the OLS model.- 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])Selects the regression model that better fits the data and trains it with the given training data.
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