Class GWRLocalCollinearity
Defined in File GWRLocalCollinearity.h
Inheritance Relationships
Base Types
public gwm::GWRBase
(Class GWRBase)public gwm::IBandwidthSelectable
(Struct IBandwidthSelectable)public gwm::IParallelizable
(Struct IParallelizable)public gwm::IParallelOpenmpEnabled
(Struct IParallelOpenmpEnabled)
Class Documentation
-
class GWRLocalCollinearity : public gwm::GWRBase, public gwm::IBandwidthSelectable, public gwm::IParallelizable, public gwm::IParallelOpenmpEnabled
GWR model for dat of local collinearity.
Public Types
-
typedef double (GWRLocalCollinearity::* BandwidthSelectionCriterionCalculator)(BandwidthWeight*)
Calculator to get criterion for bandwidth optimization.
-
typedef arma::mat (GWRLocalCollinearity::* FitCalculator)(const arma::mat&, const arma::vec&)
Calculator to predict.
-
typedef arma::mat (GWRLocalCollinearity::* PredictCalculator)(const arma::mat&, const arma::mat&, const arma::vec&)
Calculator to predict.
Public Functions
-
GWRLocalCollinearity()
Construct a new GWRLocalCollinearity object.
-
~GWRLocalCollinearity()
Destroy the GWRLocalCollinearity object.
-
inline double cnThresh() const
Get the threshold. The threshold.
-
inline void setCnThresh(double cnThresh)
Set the threshold. The threshold.
-
inline double lambda() const
Get the lambda value The lambda value.
-
inline void setLambda(double lambda)
Set the lambda value The lambda value.
-
inline bool hasHatMatrix() const
Get whether has hat matrix. Yes No.
-
inline void setHasHatMatrix(bool value)
Set whether has hat matrix. Whether has hat matrix.
-
inline bool lambdaAdjust() const
Get whether to adjust lambda.
-
inline void setLambdaAdjust(bool lambdaAdjust)
Set whether to adjust lambda Whether to adjust lambda.
-
inline RegressionDiagnostic dialnostic() const
-
inline bool isAutoselectBandwidth() const
Get whether bandwidth optimization is enabled. Yes No.
-
inline void setIsAutoselectBandwidth(bool isAutoSelect)
Set whether bandwidth optimization is enabled. Whether bandwidth optimization is enabled.
-
inline const BandwidthCriterionList &bandwidthSelectionCriterionList() const
Get the list of criterion values for each bandwidth value. List of criterion values for each bandwidth value.
-
inline BandwidthSelectionCriterionType bandwidthSelectionCriterion() const
Get the type of criterion for bandwidth optimization. Type of criterion for bandwidth optimization.
-
void setBandwidthSelectionCriterion(const BandwidthSelectionCriterionType &criterion)
Set the type of criterion for bandwidth optimization. Type of criterion for bandwidth optimization.
-
inline virtual Status getCriterion(BandwidthWeight *bandwidthWeight, double &criterion) override
Get criterion value with given bandwidth for bandwidth optimization.
- Parameters:
weight – Given bandwidth.
criterion – [out] Criterion value.
- Returns:
Status Algorithm status.
-
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.
-
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.
- Parameters:
type – Parallel type of this algorithm.
-
inline virtual void setOmpThreadNum(const int threadNum) override
Set the thread numbers while paralleling.
- Parameters:
threadNum – Number of threads.
Public Static Functions
-
static RegressionDiagnostic CalcDiagnostic(const arma::mat &x, const arma::vec &y, const arma::mat &betas, const arma::vec &shat)
Calculate diagnostic information. Independent variables Dependent variables Coefficient estimates A vector of trace of \(S\) and \(S'S\) Diagnostic information.
Protected Functions
-
double LcrCV(double bw, arma::uword kernel, bool adaptive, double lambda, bool lambdaAdjust, double cnThresh)
Get the CV.
-
arma::vec ridgelm(const arma::vec &w, double lambda)
Ridge linear regression.
Protected Attributes
-
BandwidthCriterionList mBandwidthSelectionCriterionList
-
BandwidthSelectionCriterionType mBandwidthSelectionCriterion = BandwidthSelectionCriterionType::CV
-
BandwidthSelectionCriterionCalculator mBandwidthSelectionCriterionFunction = &GWRLocalCollinearity::bandwidthSizeCriterionCVSerial
-
double mBandwidthLastCriterion = DBL_MAX
Last criterion for bandwidth selection.
-
typedef double (GWRLocalCollinearity::* BandwidthSelectionCriterionCalculator)(BandwidthWeight*)