Class GWAverage
Defined in File GWAverage.h
Inheritance Relationships
Base Types
public gwm::SpatialMonoscaleAlgorithm
(Class SpatialMonoscaleAlgorithm)public gwm::IMultivariableAnalysis
(Struct IMultivariableAnalysis)public gwm::IParallelizable
(Struct IParallelizable)public gwm::IParallelOpenmpEnabled
(Struct IParallelOpenmpEnabled)
Class Documentation
-
class GWAverage : public gwm::SpatialMonoscaleAlgorithm, public gwm::IMultivariableAnalysis, public gwm::IParallelizable, public gwm::IParallelOpenmpEnabled
The class for Summary Statistics of Geographically Weighted Average. Geographically Weighted Average is an algorithm for calculating local weighted statistics. They are local mean, local standard deviation, local variance, local skewness, local coefficients of variation, local medians, local interquartile ranges, local quantile imbalances and coordinates. To get these matrices, call these functions:
local mean <- GWAverage::localMean()
local standard deviation <- GWAverage::localSDev()
local variance <- GWAverage::localVar()
local skewness <- GWAverage::localSkewness()
local coefficients of variation <- GWAverage::localCV()
local medians <- GWAverage::localMedian()
local interquartile ranges <- GWAverage::iqr()
local quantile imbalances and coordinates <- GWAverage::qi()
Public Functions
-
inline GWAverage(const arma::mat x, const arma::mat coords, const SpatialWeight &spatialWeight)
Construct a new GWAverage object.
-
inline bool quantile() const
Get whether use quantile algorithms. if use quantile algorithms if not to use quantile algorithms.
-
inline void setQuantile(bool quantile)
Get whether use quantile algorithms. Whether use quantile algorithms.
-
inline const arma::mat &localMean() const
Get local mean on each sample. Local mean on each sample.
-
inline const arma::mat &localSDev() const
Get local standard deviation on each sample. Local standard deviation on each sample.
-
inline const arma::mat &localSkewness() const
Get local skewness on each sample. Local skewness on each sample.
-
inline const arma::mat &localCV() const
Get local coefficients of variation on each sample. Local coefficients of variation on each sample.
-
inline const arma::mat &localVar() const
Get local variance on each sample. Local variance on each sample.
-
inline const arma::mat &localMedian() const
Get local median on each sample. Local median on each sample.
-
inline const arma::mat &iqr() const
Get local interquartile ranges on each sample. Local interquartile ranges on each sample.
-
inline const arma::mat &qi() const
Get local quantile imbalances and coordinates on each sample. Local quantile imbalances and coordinates on each sample.
-
virtual bool isValid() override
Check whether the algorithm’s configuration is valid.
- Returns:
true if the algorithm’s configuration is valid.
- Returns:
false if the algorithm’s configuration is invalid.
-
inline virtual const arma::mat &variables() const override
Get variables.
- Returns:
Vector of variables.
-
inline virtual void setVariables(const arma::mat &x) override
set variables variables for GWAverage
-
virtual void run() override
Run analysis algorithm.
-
void calibration(const arma::mat &locations, const arma::mat &x)
-
void createCalibrationDistanceParameter(const arma::mat &locations)
-
inline virtual int parallelAbility() const override
Return the parallel ability of this algorithm.
- Returns:
Bitwise OR of aviliable parallel types of this algorithm.
-
inline virtual ParallelType parallelType() const override
Return the parallel type of this algorithm.
- Returns:
Parallel type of this algorithm
-
virtual void setParallelType(const ParallelType &type) override
Set the parallel type of this algorithm.
Use gwmodel_set_GWAverage_openmp() to set parallel type of this algorithm to ParallelType::OpenMP in shared build.
- Parameters:
type – Parallel type of this algorithm.
-
inline virtual void setOmpThreadNum(const int threadNum) override
Set the thread numbers while paralleling.
Use gwmodel_set_GWAverage_openmp() to set this property in shared build.
- Parameters:
threadNum – Number of threads.
-
void updateCalculator()
Update calculator function according to parallel type.
Public Static Functions
-
static arma::vec del(arma::vec x, arma::uword rowcount)
-
static inline arma::vec rank(arma::vec x)
Protected Static Functions
-
static arma::vec findq(const arma::mat &x, const arma::vec &w)