Class GWRScalable

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class GWRScalable : public gwm::GWRBase

Scalable GWR.

Public Types

enum BandwidthSelectionCriterionType

Type of bandwidth criterion.

Values:

enumerator AIC

AIC.

enumerator CV

CV.

Public Functions

inline GWRScalable()

Construct a new GWRScalable object.

inline ~GWRScalable()

Destroy the GWRScalable object.

inline arma::uword polynomial() const

Get the degree of polynomial kernel The degree of polynomial kernel.

inline void setPolynomial(arma::uword polynomial)

Set the degree of polynomial kernel The degree of polynomial kernel.

inline double cv() const

Get the value of CV criterion Value of CV criterion.

inline double scale() const

Get the scale. The value of scale.

inline double penalty() const

Get the penalty. The value of penalty.

inline bool hasHatMatrix() const

Get whether has hat matrix. Yes No.

inline void setHasHatMatrix(const bool has)

Set whether has hat matrix. Whether has hat matrix.

inline BandwidthSelectionCriterionType parameterOptimizeCriterion() const

Get the type of calculator for parameter optimization criterion. Type of calculator for parameter optimization criterion.

inline void setParameterOptimizeCriterion(const BandwidthSelectionCriterionType &parameterOptimizeCriterion)

Set the calculator for parameter optimization criterion. Type of calculator for parameter optimization criterion.

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.

virtual arma::mat fit() override

Fit coefficient estimates.

Returns:

mat Coefficient estimates

virtual arma::mat predict(const arma::mat &locations) override

Predict coefficients on specified locations.

Parameters:

locations – Locations where to predict coefficients.

Returns:

mat Predicted coefficients.

Public Static Functions

static double Loocv(const arma::vec &target, const arma::mat &x, const arma::vec &y, arma::uword poly, const arma::mat &Mx0, const arma::mat &My0)

Calculate the value of CV criterion. Variables to optimize Independent variables Dependent variables The degree of polynomial kernel Value of CV criterion.

static double AICvalue(const arma::vec &target, const arma::mat &x, const arma::vec &y, arma::uword poly, const arma::mat &Mx0, const arma::mat &My0)

Calculate the value of AIC criterion. Variables to optimize Independent variables Dependent variables The degree of polynomial kernel Value of AIC criterion.

struct LoocvParams

Additional parameters for leave-one-out CV.

Public Members

const arma::mat *x

Independent variables.

const arma::mat *y

Dependent variables.

const arma::uword polynomial

The degree of polynomial kernel.

const arma::mat *Mx0
const arma::mat *My0