Changeset 2696


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

remove trailing whitespace

Location:
trunk/yat/statistics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/ROC.cc

    r2612 r2696  
    3535namespace theplu {
    3636namespace yat {
    37 namespace statistics { 
    38 
    39   ROC::ROC(void) 
     37namespace statistics {
     38
     39  ROC::ROC(void)
    4040    :minimum_size_(10)
    4141  {
  • trunk/yat/statistics/ROC.h

    r2673 r2696  
    1 #ifndef _theplu_yat_statistics_roc_ 
    2 #define _theplu_yat_statistics_roc_ 
     1#ifndef _theplu_yat_statistics_roc_
     2#define _theplu_yat_statistics_roc_
    33
    44// $Id$
     
    3232namespace theplu {
    3333namespace yat {
    34 namespace statistics { 
     34namespace statistics {
    3535
    3636  ///
    37   /// @brief Reciever Operating Characteristic. 
     37  /// @brief Reciever Operating Characteristic.
    3838  ///
    3939  /// As the area under an ROC curve is equivalent to Mann-Whitney U
     
    4545  class ROC
    4646  {
    47  
     47
    4848  public:
    4949    ///
     
    5151    ///
    5252    ROC(void);
    53          
     53
    5454    /**
    5555       \brief Add a data value.
     
    9393       n_neg(void), are smaller than minimum_size the exact method is
    9494       used.
    95        
     95
    9696       \see p_value
    9797
     
    136136       and the p-value is calculated as
    137137       \f[
    138        P = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^z 
     138       P = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^z
    139139       \exp{\left(-\frac{t^2}{2}\right)} dt
    140140       \f]
    141141
    142        where 
    143 
    144        \f[
    145        z = \frac{\textrm{area} - 0.5 - 0.5/(n^+ \cdot n^-)}{s} 
     142       where
     143
     144       \f[
     145       z = \frac{\textrm{area} - 0.5 - 0.5/(n^+ \cdot n^-)}{s}
    146146       \f]
    147147
    148        and 
     148       and
    149149
    150150       \f[
     
    163163     */
    164164    double p_value_one_sided(void) const;
    165    
     165
    166166    /**
    167167       \brief Two-sided p-value.
     
    169169       Calculates the probability to get an area, \c a, equal or more
    170170       extreme than \c area
    171        \f[ 
    172        P(a \ge \textrm{max}(\textrm{area},1-\textrm{area})) + 
     171       \f[
     172       P(a \ge \textrm{max}(\textrm{area},1-\textrm{area})) +
    173173       P(a \le \textrm{min}(\textrm{area}, 1-\textrm{area})) \f]
    174174
     
    190190  private:
    191191    typedef std::multimap<double, std::pair<bool, double> > Map;
    192    
     192
    193193    /// Implemented as in MatLab 13.1
    194194    double get_p_approx(double) const;
     
    202202    /**
    203203       \return probability to get auc >= \a area. If area<0.5
    204        probability to auc <= area is returned 
     204       probability to auc <= area is returned
    205205
    206206       \note assumes all non-zero weights are equal (typically unity
     
    220220
    221221  template<typename ForwardIterator>
    222   double 
     222  double
    223223  ROC::p_exact_with_ties(ForwardIterator begin, ForwardIterator end,
    224224                         double block, double pos, double neg) const
     
    241241      double pos2 = pos-pos1;
    242242      double neg2 = neg-neg1;
    243       result += gsl_ran_hypergeometric_pdf(i, static_cast<unsigned int>(pos), 
     243      result += gsl_ran_hypergeometric_pdf(i, static_cast<unsigned int>(pos),
    244244                                           static_cast<unsigned int>(neg), n)
    245         * p_exact_with_ties(iter, end, 
    246                             block - pos2*neg1 - 0.5*pos1*neg1, 
     245        * p_exact_with_ties(iter, end,
     246                            block - pos2*neg1 - 0.5*pos1*neg1,
    247247                            pos2, neg2);
    248248    }
Note: See TracChangeset for help on using the changeset viewer.