Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions include/gwmodelpp/GWRGeneralized.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,34 @@ class GWRGeneralized : public GWRBase, public IBandwidthSelectable, public IPara
bool hasRegressionData() const;
void setHasRegressionData(bool value);

/*
* @brief \~english Get the beta estimates. \~chinese 获取回归系数估计值。
*
* @return arma::mat \~english Beta estimates \~chinese 回归系数估计值
*/
arma::mat betas() { return mBetas; }

/*
* @brief \~english Get standard errors of the beta estimates. \~chinese 获取回归系数估计值的标准差。
*
* @return arma::mat \~english Standard errors of beta estimates \~chinese 回归系数估计值的标准差
*/
arma::mat betasSE() { return mBetasSE; }

/**
* @brief \~english Get a vector of trace of \f$S\f$ and \f$S'S\f$. \~chinese 获取一个包含 \f$S\f$ 和 \f$S'S\f$ 矩阵迹的向量。
*
* @return arma::vec \~english A vector of trace of \f$S\f$ and \f$S'S\f$ \~chinese 一个包含 \f$S\f$ 和 \f$S'S\f$ 矩阵迹的向量
*/
arma::vec sHat() { return mShat; }

/**
* @brief \~english Get the hat matrix \f$S\f$. \~chinese 获取帽子矩阵 \f$S\f$。
*
* @return arma::mat \~english The hat matrix \f$S\f$ \~chinese 帽子矩阵 \f$S\f$
*/
arma::vec s() {return mS;}

private:

/**
Expand Down
1 change: 1 addition & 0 deletions src/gwmodelpp/GTDR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ using namespace gwm;

RegressionDiagnostic GTDR::CalcDiagnostic(const mat& x, const vec& y, const mat& betas, const vec& shat)
{
// this line is a test line.
vec r = y - sum(betas % x, 1);
double rss = sum(r % r);
double n = (double)x.n_rows;
Expand Down
Loading