# Changeset 1006 for trunk/yat/statistics/PearsonCorrelation.h

Ignore:
Timestamp:
Jan 24, 2008, 7:08:00 PM (14 years ago)
Message:

fixing doxygen problems

File:
1 edited

### Legend:

Unmodified
 r1000 class VectorAbstract; } namespace statistics { namespace statistics { /// /// @brief Class for calculating Pearson correlation. /// /// /// @brief Class for calculating Pearson correlation. /// class PearsonCorrelation { public: /// /// @brief The default constructor. /// PearsonCorrelation(void); /// /// @brief The destructor. /// virtual ~PearsonCorrelation(void); /// /// \f$\frac{\vert \sum_i(x_i-\bar{x})(y_i-\bar{y})\vert /// }{\sqrt{\sum_i (x_i-\bar{x})^2\sum_i (x_i-\bar{x})^2}} \f$. /// @return Pearson correlation, if absolute=true absolute value /// of Pearson is used. { public: /// /// @brief The default constructor. /// PearsonCorrelation(void); /// /// @brief The destructor. /// virtual ~PearsonCorrelation(void); /** \f$\frac{\vert \sum_i(x_i-\bar{x})(y_i-\bar{y})\vert }{\sqrt{\sum_i (x_i-\bar{x})^2\sum_i (x_i-\bar{x})^2}} \f$. @return Pearson correlation, if absolute=true absolute value of Pearson is used. */ double score(const classifier::Target& target, const utility::vector& value); /// /// \f$\frac{\vert \sum_iw^2_i(x_i-\bar{x})(y_i-\bar{y})\vert } /// {\sqrt{\sum_iw^2_i(x_i-\bar{x})^2\sum_iw^2_i(y_i-\bar{y})^2}} /// \f$, where \f$m_x = \frac{\sum w_ix_i}{\sum w_i} \f$ and \f$/// m_x = \frac{\sum w_ix_i}{\sum w_i} \f$. This expression is /// chosen to get a correlation equal to unity when \a x and \a y /// are equal. @return absolute value of weighted version of /// Pearson correlation. /// /** \f$\frac{\vert \sum_iw^2_i(x_i-\bar{x})(y_i-\bar{y})\vert } {\sqrt{\sum_iw^2_i(x_i-\bar{x})^2\sum_iw^2_i(y_i-\bar{y})^2}} \f$, where \f$m_x = \frac{\sum w_ix_i}{\sum w_i} \f$ and \f$m_x = \frac{\sum w_ix_i}{\sum w_i} \f$. This expression is chosen to get a correlation equal to unity when \a x and \a y are equal. @return absolute value of weighted version of Pearson correlation. */ double score(const classifier::Target& target, const classifier::DataLookupWeighted1D& value); /// /// \f$\frac{\vert \sum_iw^2_i(x_i-\bar{x})(y_i-\bar{y})\vert } /// {\sqrt{\sum_iw^2_i(x_i-\bar{x})^2\sum_iw^2_i(y_i-\bar{y})^2}} /// \f$, where \f$m_x = \frac{\sum w_ix_i}{\sum w_i} \f$ and \f$/// m_x = \frac{\sum w_ix_i}{\sum w_i} \f$. This expression is /// chosen to get a correlation equal to unity when \a x and \a y /// are equal. @return absolute value of weighted version of /// Pearson correlation. /// /** \f$\frac{\vert \sum_iw^2_i(x_i-\bar{x})(y_i-\bar{y})\vert } {\sqrt{\sum_iw^2_i(x_i-\bar{x})^2\sum_iw^2_i(y_i-\bar{y})^2}} \f$, where \f$m_x = \frac{\sum w_ix_i}{\sum w_i} \f$ and \f$m_x = \frac{\sum w_ix_i}{\sum w_i} \f$. This expression is chosen to get a correlation equal to unity when \a x and \a y are equal. @return absolute value of weighted version of Pearson correlation. */ double score(const classifier::Target& target, const utility::vector& value, const utility::vector& weight); /// /// The p-value is the probability of getting a correlation as /// large (or larger) as the observed value by random chance, when the true /// correlation is zero (and the data is Gaussian). /// /// @Note This function can only be used together with the /// unweighted score. /// /// @return one-sided p-value /// double p_value_one_sided() const; private: /** The p-value is the probability of getting a correlation as large (or larger) as the observed value by random chance, when the true correlation is zero (and the data is Gaussian). @Note This function can only be used together with the unweighted score. @return one-sided p-value */ double p_value_one_sided() const; private: double r_; int nof_samples_; //    void centralize(utility::vector&, const utility::vector&); }; }}} // of namespace statistics, yat, and theplu