类 GWRRobust

继承关系

基类

类文档

class GWRRobust : public gwm::GWRBasic

鲁棒地理加权回归模型

公有成员函数

inline GWRRobust()

构造一个新的 GWRRobust 对象。

inline ~GWRRobust()

销毁 GWRRobust 对象。

inline bool filtered() const

获取是否使用 Filtered 算法

返回

true 是

返回

false 否

inline void setFiltered(bool value)

设置是否使用 Filtered 算法

参数

value – 是否使用 Filtered 算法

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

在指定位置处进行回归系数预测。

参数

locations – 指定位置。

返回

mat 回归系数预测值。

virtual arma::mat fit() override

拟合回归系数估计值。

返回

mat 回归系数估计值。

arma::mat regressionHatmatrix(const arma::mat &x, const arma::vec &y, arma::mat &betasSE, arma::vec &shat, arma::vec &qdiag, arma::mat &S)
virtual void setParallelType(const ParallelType &type) override

设置当前算法的并行类型。

参数

type – 当前算法的并行类型。

保护成员函数

arma::mat robustGWRCaliFirst(const arma::mat &x, const arma::vec &y, arma::mat &betasSE, arma::vec &shat, arma::vec &qDiag, arma::mat &S)

第一种解法。

参数
  • x – 自变量

  • y – 因变量

  • betasSE – [出参] 回归系数估计值标准误差。

  • shat – [出参] 一个包含 \(S\)\(S'S\) 矩阵迹的向量

  • qdiag – [出参] 矩阵 \(Q\) 的对角线元素

  • S – [出参] 帽子矩阵 \(S\)

返回

arma::mat 回归系数估计值

arma::mat robustGWRCaliSecond(const arma::mat &x, const arma::vec &y, arma::mat &betasSE, arma::vec &shat, arma::vec &qDiag, arma::mat &S)

第二种解法。

参数
  • x – 自变量

  • y – 因变量

  • betasSE – [出参] 回归系数估计值标准误差。

  • shat – [出参] 一个包含 \(S\)\(S'S\) 矩阵迹的向量

  • qdiag – [出参] 矩阵 \(Q\) 的对角线元素

  • S – [出参] 帽子矩阵 \(S\)

返回

arma::mat 回归系数估计值

arma::vec filtWeight(arma::vec residual, double mse)

计算二次权重函数。

参数
  • residual – 残差

  • mse – 平方残差平均数

返回

arma::vec 二次加权权重

void createPredictionDistanceParameter(const arma::mat &locations)

构造用于预测的距离参数。

参数

locations – 要预测回归系数的位置