# Changeset 2696

Ignore:
Timestamp:
Feb 28, 2012, 2:51:05 PM (11 years ago)
Message:

remove trailing whitespace

Location:
trunk/yat/statistics
Files:
2 edited

### Legend:

Unmodified
 r2673 #ifndef _theplu_yat_statistics_roc_ #define _theplu_yat_statistics_roc_ #ifndef _theplu_yat_statistics_roc_ #define _theplu_yat_statistics_roc_ // $Id$ namespace theplu { namespace yat { namespace statistics { namespace statistics { /// /// @brief Reciever Operating Characteristic. /// @brief Reciever Operating Characteristic. /// /// As the area under an ROC curve is equivalent to Mann-Whitney U class ROC { public: /// /// ROC(void); /** \brief Add a data value. n_neg(void), are smaller than minimum_size the exact method is used. \see p_value and the p-value is calculated as \f[ P = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^z P = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^z \exp{\left(-\frac{t^2}{2}\right)} dt \f] where \f[ z = \frac{\textrm{area} - 0.5 - 0.5/(n^+ \cdot n^-)}{s} where \f[ z = \frac{\textrm{area} - 0.5 - 0.5/(n^+ \cdot n^-)}{s} \f] and and \f[ */ double p_value_one_sided(void) const; /** \brief Two-sided p-value. Calculates the probability to get an area, \c a, equal or more extreme than \c area \f[ P(a \ge \textrm{max}(\textrm{area},1-\textrm{area})) + \f[ P(a \ge \textrm{max}(\textrm{area},1-\textrm{area})) + P(a \le \textrm{min}(\textrm{area}, 1-\textrm{area})) \f] private: typedef std::multimap > Map; /// Implemented as in MatLab 13.1 double get_p_approx(double) const; /** \return probability to get auc >= \a area. If area<0.5 probability to auc <= area is returned probability to auc <= area is returned \note assumes all non-zero weights are equal (typically unity template double double ROC::p_exact_with_ties(ForwardIterator begin, ForwardIterator end, double block, double pos, double neg) const double pos2 = pos-pos1; double neg2 = neg-neg1; result += gsl_ran_hypergeometric_pdf(i, static_cast(pos), result += gsl_ran_hypergeometric_pdf(i, static_cast(pos), static_cast(neg), n) * p_exact_with_ties(iter, end, block - pos2*neg1 - 0.5*pos1*neg1, * p_exact_with_ties(iter, end, block - pos2*neg1 - 0.5*pos1*neg1, pos2, neg2); }