oraclesai.regression.SpatialRegimesRegressor
- class SpatialRegimesRegressor(spatial_weights_definition=None)
The regression equation parameters are estimated according to a categorical variable called regime; this categorical variable can represent different things, such as a region in a spatial context. Neighborhoods, such as district or block names, can be used to define regimes. The model consists of linear regression models where the terms of the linear equation vary depending on the regime.
- Parameters:
spatial_weights_definition – SpatialWeightsDefinition, default=None. Specifies the spatial relationship among neighbors.
Methods
__init__
([spatial_weights_definition])fit
(X, y[, geometries, crs, ...])The parameter
regimes
indicates the categorical variable used as regime.get_params
([deep])Get parameters for this estimator.
predict
(X[, regimes, geometries, ...])Evaluates the model using the given data and the regimes.
score
(X, y[, sample_weight, regimes, ...])Returns R-Squared metric.
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