com.esri.arcgis.geoprocessing.tools.spatialstatisticstools
Class GeographicallyWeightedRegression

java.lang.Object
  extended by com.esri.arcgis.geoprocessing.AbstractGPTool
      extended by com.esri.arcgis.geoprocessing.tools.spatialstatisticstools.GeographicallyWeightedRegression
All Implemented Interfaces:
GPTool

public class GeographicallyWeightedRegression
extends AbstractGPTool

Performs Geographically Weighted Regression (GWR), a local form of linear regression used to model spatially varying relationships. The Geographically Weighted Regression tool is contained in the Spatial Statistics Tools tool box.

Usage tips:


Field Summary
 
Fields inherited from class com.esri.arcgis.geoprocessing.AbstractGPTool
vals
 
Constructor Summary
GeographicallyWeightedRegression()
          Creates the Geographically Weighted Regression tool with defaults.
GeographicallyWeightedRegression(Object inFeatures, Object dependentField, Object explanatoryField, Object outFeatureclass, String kernelType, String bandwidthMethod)
          Creates the Geographically Weighted Regression tool with the required parameters.
 
Method Summary
 String getBandwidthMethod()
          Returns the Bandwidth method parameter of this tool .
 Object getCellSize()
          Returns the Output cell size parameter of this tool .
 Object getCoefficientRasterWorkspace()
          Returns the Coefficient raster workspace parameter of this tool .
 Object getDependentField()
          Returns the Dependent variable parameter of this tool .
 double getDistance()
          Returns the Distance parameter of this tool .
 Object getExplanatoryField()
          Returns the Explanatory variable(s) parameter of this tool .
 Object getInFeatures()
          Returns the Input feature class parameter of this tool .
 Object getInPredictionLocations()
          Returns the Prediction locations parameter of this tool .
 String getKernelType()
          Returns the Kernel type parameter of this tool .
 int getNumberOfNeighbors()
          Returns the Number of neighbors parameter of this tool .
 Object getOutFeatureclass()
          Returns the Output feature class parameter of this tool .
 Object getOutPredictionFeatureclass()
          Returns the Output prediction feature class parameter of this tool .
 Object getOutRegressionRasters()
          Returns the Output regression rasters parameter of this tool (Read only).
 Object getOutTable()
          Returns the Output table parameter of this tool (Read only).
 Object getPredictionExplanatoryField()
          Returns the Prediction explanatory variable(s) parameter of this tool .
 String getToolboxAlias()
          Returns the alias of the tool box containing this tool.
 String getToolboxName()
          Returns the name of the tool box containing this tool.
 String getToolName()
          Returns the name of this tool.
 Object getWeightField()
          Returns the Weights parameter of this tool .
 void setBandwidthMethod(String bandwidthMethod)
          Sets the Bandwidth method parameter of this tool .
 void setCellSize(Object cellSize)
          Sets the Output cell size parameter of this tool .
 void setCoefficientRasterWorkspace(Object coefficientRasterWorkspace)
          Sets the Coefficient raster workspace parameter of this tool .
 void setDependentField(Object dependentField)
          Sets the Dependent variable parameter of this tool .
 void setDistance(double distance)
          Sets the Distance parameter of this tool .
 void setExplanatoryField(Object explanatoryField)
          Sets the Explanatory variable(s) parameter of this tool .
 void setInFeatures(Object inFeatures)
          Sets the Input feature class parameter of this tool .
 void setInPredictionLocations(Object inPredictionLocations)
          Sets the Prediction locations parameter of this tool .
 void setKernelType(String kernelType)
          Sets the Kernel type parameter of this tool .
 void setNumberOfNeighbors(int numberOfNeighbors)
          Sets the Number of neighbors parameter of this tool .
 void setOutFeatureclass(Object outFeatureclass)
          Sets the Output feature class parameter of this tool .
 void setOutPredictionFeatureclass(Object outPredictionFeatureclass)
          Sets the Output prediction feature class parameter of this tool .
 void setPredictionExplanatoryField(Object predictionExplanatoryField)
          Sets the Prediction explanatory variable(s) parameter of this tool .
 void setWeightField(Object weightField)
          Sets the Weights parameter of this tool .
 
Methods inherited from class com.esri.arcgis.geoprocessing.AbstractGPTool
getParameterValues, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeographicallyWeightedRegression

public GeographicallyWeightedRegression()
Creates the Geographically Weighted Regression tool with defaults.

Initializes the array of tool parameters with the default values specified when the tool was created.


GeographicallyWeightedRegression

public GeographicallyWeightedRegression(Object inFeatures,
                                        Object dependentField,
                                        Object explanatoryField,
                                        Object outFeatureclass,
                                        String kernelType,
                                        String bandwidthMethod)
Creates the Geographically Weighted Regression tool with the required parameters.

Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.

Parameters:
inFeatures - the feature class containing the dependent and independent variables.
dependentField - the numeric field containing values for what you are trying to model.
explanatoryField - a list of fields representing independent explanatory variables in your regression model.
outFeatureclass - the output feature class to receive dependent variable estimates and residuals.
kernelType - specifies if the kernel is constructed as a fixed distance, or if it is allowed to vary in extent as a function of feature density.
bandwidthMethod - null
Method Detail

getInFeatures

public Object getInFeatures()
Returns the Input feature class parameter of this tool . This parameter is the feature class containing the dependent and independent variables. This is a required parameter.

Returns:
the Input feature class

setInFeatures

public void setInFeatures(Object inFeatures)
Sets the Input feature class parameter of this tool . This parameter is the feature class containing the dependent and independent variables. This is a required parameter.

Parameters:
inFeatures - the feature class containing the dependent and independent variables.

getDependentField

public Object getDependentField()
Returns the Dependent variable parameter of this tool . This parameter is the numeric field containing values for what you are trying to model. This is a required parameter.

Returns:
the Dependent variable

setDependentField

public void setDependentField(Object dependentField)
Sets the Dependent variable parameter of this tool . This parameter is the numeric field containing values for what you are trying to model. This is a required parameter.

Parameters:
dependentField - the numeric field containing values for what you are trying to model.

getExplanatoryField

public Object getExplanatoryField()
Returns the Explanatory variable(s) parameter of this tool . This parameter is a list of fields representing independent explanatory variables in your regression model. This is a required parameter.

Returns:
the Explanatory variable(s)

setExplanatoryField

public void setExplanatoryField(Object explanatoryField)
Sets the Explanatory variable(s) parameter of this tool . This parameter is a list of fields representing independent explanatory variables in your regression model. This is a required parameter.

Parameters:
explanatoryField - a list of fields representing independent explanatory variables in your regression model.

getOutFeatureclass

public Object getOutFeatureclass()
Returns the Output feature class parameter of this tool . This parameter is the output feature class to receive dependent variable estimates and residuals. This is a required parameter.

Returns:
the Output feature class

setOutFeatureclass

public void setOutFeatureclass(Object outFeatureclass)
Sets the Output feature class parameter of this tool . This parameter is the output feature class to receive dependent variable estimates and residuals. This is a required parameter.

Parameters:
outFeatureclass - the output feature class to receive dependent variable estimates and residuals.

getKernelType

public String getKernelType()
Returns the Kernel type parameter of this tool . This parameter is specifies if the kernel is constructed as a fixed distance, or if it is allowed to vary in extent as a function of feature density. This is a required parameter.

Returns:
the Kernel type

setKernelType

public void setKernelType(String kernelType)
Sets the Kernel type parameter of this tool . This parameter is specifies if the kernel is constructed as a fixed distance, or if it is allowed to vary in extent as a function of feature density. This is a required parameter.

Parameters:
kernelType - specifies if the kernel is constructed as a fixed distance, or if it is allowed to vary in extent as a function of feature density.

getBandwidthMethod

public String getBandwidthMethod()
Returns the Bandwidth method parameter of this tool . This is a required parameter.

Returns:
the Bandwidth method

setBandwidthMethod

public void setBandwidthMethod(String bandwidthMethod)
Sets the Bandwidth method parameter of this tool . This is a required parameter.

Parameters:
bandwidthMethod - null

getDistance

public double getDistance()
Returns the Distance parameter of this tool . This is an optional parameter.

Returns:
the Distance

setDistance

public void setDistance(double distance)
Sets the Distance parameter of this tool . This is an optional parameter.

Parameters:
distance - null

getNumberOfNeighbors

public int getNumberOfNeighbors()
Returns the Number of neighbors parameter of this tool . This parameter is an integer reflecting the exact number of neighbors to include in the local bandwidth of the Gaussian kernel whenever the kernel type is ADAPTIVE and the bandwidth method is BANDWIDTH PARAMETER. This is an optional parameter.

Returns:
the Number of neighbors

setNumberOfNeighbors

public void setNumberOfNeighbors(int numberOfNeighbors)
Sets the Number of neighbors parameter of this tool . This parameter is an integer reflecting the exact number of neighbors to include in the local bandwidth of the Gaussian kernel whenever the kernel type is ADAPTIVE and the bandwidth method is BANDWIDTH PARAMETER. This is an optional parameter.

Parameters:
numberOfNeighbors - an integer reflecting the exact number of neighbors to include in the local bandwidth of the Gaussian kernel whenever the kernel type is ADAPTIVE and the bandwidth method is BANDWIDTH PARAMETER.

getWeightField

public Object getWeightField()
Returns the Weights parameter of this tool . This parameter is the numeric field containing a spatial weighting for individual features. This weight field allows some features to be more important in the model calibration process than others. Primarily useful when the number of samples taken at different locations varies, values for the dependent and independent variables are averaged, and places with more samples are more reliable (should be weighted higher). If you have an average of 25 different samples for one location, but an average of only 2 samples for another location, you can use the number of samples as your weight field so that locations with more samples have a larger influence on model calibration that locations with few samples. This is an optional parameter.

Returns:
the Weights

setWeightField

public void setWeightField(Object weightField)
Sets the Weights parameter of this tool . This parameter is the numeric field containing a spatial weighting for individual features. This weight field allows some features to be more important in the model calibration process than others. Primarily useful when the number of samples taken at different locations varies, values for the dependent and independent variables are averaged, and places with more samples are more reliable (should be weighted higher). If you have an average of 25 different samples for one location, but an average of only 2 samples for another location, you can use the number of samples as your weight field so that locations with more samples have a larger influence on model calibration that locations with few samples. This is an optional parameter.

Parameters:
weightField - the numeric field containing a spatial weighting for individual features. This weight field allows some features to be more important in the model calibration process than others. Primarily useful when the number of samples taken at different locations varies, values for the dependent and independent variables are averaged, and places with more samples are more reliable (should be weighted higher). If you have an average of 25 different samples for one location, but an average of only 2 samples for another location, you can use the number of samples as your weight field so that locations with more samples have a larger influence on model calibration that locations with few samples.

getCoefficientRasterWorkspace

public Object getCoefficientRasterWorkspace()
Returns the Coefficient raster workspace parameter of this tool . This is an optional parameter.

Returns:
the Coefficient raster workspace

setCoefficientRasterWorkspace

public void setCoefficientRasterWorkspace(Object coefficientRasterWorkspace)
Sets the Coefficient raster workspace parameter of this tool . This is an optional parameter.

Parameters:
coefficientRasterWorkspace - null

getCellSize

public Object getCellSize()
Returns the Output cell size parameter of this tool . This parameter is the cell size (a number) or reference to the cell size (a pathname to a raster dataset) to use when creating the coefficient rasters. the default cell size is the shortest of the width or height of the extent specified in the Environment output coordinate system, divided by 250. This is an optional parameter.

Returns:
the Output cell size

setCellSize

public void setCellSize(Object cellSize)
Sets the Output cell size parameter of this tool . This parameter is the cell size (a number) or reference to the cell size (a pathname to a raster dataset) to use when creating the coefficient rasters. the default cell size is the shortest of the width or height of the extent specified in the Environment output coordinate system, divided by 250. This is an optional parameter.

Parameters:
cellSize - the cell size (a number) or reference to the cell size (a pathname to a raster dataset) to use when creating the coefficient rasters. the default cell size is the shortest of the width or height of the extent specified in the Environment output coordinate system, divided by 250.

getInPredictionLocations

public Object getInPredictionLocations()
Returns the Prediction locations parameter of this tool . This parameter is a feature class containing features representing locations where estimates should be computed. Each feature in this dataset should contain values for all of the explanatory variables specified; the dependent variable for these features will be estimated using the model calibrated for the input feature class data. This is an optional parameter.

Returns:
the Prediction locations

setInPredictionLocations

public void setInPredictionLocations(Object inPredictionLocations)
Sets the Prediction locations parameter of this tool . This parameter is a feature class containing features representing locations where estimates should be computed. Each feature in this dataset should contain values for all of the explanatory variables specified; the dependent variable for these features will be estimated using the model calibrated for the input feature class data. This is an optional parameter.

Parameters:
inPredictionLocations - a feature class containing features representing locations where estimates should be computed. Each feature in this dataset should contain values for all of the explanatory variables specified; the dependent variable for these features will be estimated using the model calibrated for the input feature class data.

getPredictionExplanatoryField

public Object getPredictionExplanatoryField()
Returns the Prediction explanatory variable(s) parameter of this tool . This parameter is a list of fields representing explanatory variables in the Prediction Locations feature class. These field names should be provided in the same order (a one-to-one correspondance) as those listed for the input feature class Explanatory variables parameter. If no prediction explanatory variables are given, the output prediction feature class will only contain computed coefficient values for each prediction location. This is an optional parameter.

Returns:
the Prediction explanatory variable(s)

setPredictionExplanatoryField

public void setPredictionExplanatoryField(Object predictionExplanatoryField)
Sets the Prediction explanatory variable(s) parameter of this tool . This parameter is a list of fields representing explanatory variables in the Prediction Locations feature class. These field names should be provided in the same order (a one-to-one correspondance) as those listed for the input feature class Explanatory variables parameter. If no prediction explanatory variables are given, the output prediction feature class will only contain computed coefficient values for each prediction location. This is an optional parameter.

Parameters:
predictionExplanatoryField - a list of fields representing explanatory variables in the Prediction Locations feature class. These field names should be provided in the same order (a one-to-one correspondance) as those listed for the input feature class Explanatory variables parameter. If no prediction explanatory variables are given, the output prediction feature class will only contain computed coefficient values for each prediction location.

getOutPredictionFeatureclass

public Object getOutPredictionFeatureclass()
Returns the Output prediction feature class parameter of this tool . This is an optional parameter.

Returns:
the Output prediction feature class

setOutPredictionFeatureclass

public void setOutPredictionFeatureclass(Object outPredictionFeatureclass)
Sets the Output prediction feature class parameter of this tool . This is an optional parameter.

Parameters:
outPredictionFeatureclass - null

getOutTable

public Object getOutTable()
Returns the Output table parameter of this tool (Read only). This is an derived parameter.

Returns:
the Output table

getOutRegressionRasters

public Object getOutRegressionRasters()
Returns the Output regression rasters parameter of this tool (Read only). This is an derived parameter.

Returns:
the Output regression rasters

getToolName

public String getToolName()
Returns the name of this tool.

Returns:
the tool name

getToolboxName

public String getToolboxName()
Returns the name of the tool box containing this tool.

Returns:
the tool box name

getToolboxAlias

public String getToolboxAlias()
Returns the alias of the tool box containing this tool.

Returns:
the tool box alias