Geographically Weighted Regression

Feature Description

Geographically weighted regression is a local form of linear regression, which embeds spatial structure into the linear regression model to detect the non-stationarity of spatial relationships. Through regression analysis, we can model, examine, and explore spatial relationships, and also explain the various factors behind the observed spatial patterns.

Returns the result dataset and the geographically weighted regression model summary. The summary of results is explained as follows:

  • meanSquaredError: Mean squared error, the mean of the squared errors between predicted values and true values.
  • rootMeanSquaredError: RMSE, the mean of the square root of the squared errors between predicted values and true values.
  • meanAbsoluteError: Mean absolute error, the mean of the absolute errors between predicted values and true values.
  • r2: Coefficient of determination. Based on the value of r2, the quality of the model can be judged. The range is [0,1]. Generally, a larger r2 indicates a better model fit. r2 reflects approximately how accurate it is, because as the sample size increases, r2 inevitably increases, making it impossible to truly quantify the accuracy; it can only be roughly quantified.
  • explainedVariance: Explained variance.

Parameter description

Parameter Name Default Value parameter interpretation parameter type
Input feature dataset
  Feature dataset to be analyzed String
Data query conditions
(Optional)
  Data query conditions, supporting attribute conditions and spatial query, such as SmID<100 and BBOX(the_geom, 120,30,121,31) String
Modeling field
  Field to be modeled. String
Explain the field name collection
  Explain the field name collection. This collection inputs one or more field names from the training dataset as explanatory variables for the model. JList[String]
Neighborhood bandwidth type
  Neighborhood bandwidth type, specifying whether to use fixed bandwidth or variable bandwidth. JavaNeighborhoodType
Neighborhood distance bandwidth
(Optional)
  Neighborhood distance bandwidth, objects within the distance range are considered neighbors. When the bandwidth type is fixed, this parameter is required, and the value range is greater than 0. JavaDistance
Neighborhood number bandwidth
(Optional)
  Neighborhood number bandwidth, the neighborhood of each object is the specified number of nearest neighbors. When the bandwidth type is variable bandwidth, this parameter is required, and the value range is [2,1000]. Int
kernel function type
gaussian kernel Sets the calculation function type for distance weights between two points, supporting two kernel function types: Gaussian kernel and quadratic kernel. JavaKernelFunctionType
Geographically weighted regression summary result save directory
(Optional)
  Specifies the save directory for the geographically weighted regression summary results. String