Ignore:
Timestamp:
Oct 30, 2011, 3:36:17 AM (11 years ago)
Author:
Peter
Message:

improve docs for ROC and sister class AUC. closes #144

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/AUC.h

    r2119 r2594  
    4040namespace statistics { 
    4141
    42   ///
    43   /// @brief Class calculating Area Under ROC Curve
    44   ///   
     42  /**
     43     \brief Area Under ROC Curve
     44
     45     Class calculates area under curve from values, Target, and
     46     possibly weights. If weights are left out, unity weights are
     47     assumed. The area under curve is defined as
     48     \f[
     49     \frac{\sum_{i,j} I(x_i^+-x_j^-) w_i^+w_j^-} {\sum_{i,j}
     50     w_i^+w_j^-} \f]
     51     where
     52     \f{eqnarray*}{
     53            &0; &x<0 \\
     54     I(x) = &0.5; &x=0 \\
     55            &1; &x>0
     56     \f}
     57
     58     Complexity of calculating the AUC is \f$ N \log N \f$.
     59  */ 
    4560  class AUC : public Score
    4661  {
     
    4863  public:
    4964    ///
    50     /// \brief Defaul Constructor
     65    /// \brief Default Constructor
    5166    /// \param absolute if true max(AUC, 1-AUC) is used
    5267    ///
    5368    AUC(bool absolute=true);
    5469
    55     /// Function taking \a value, \a target (+1 or -1) and vector
    56     /// defining what samples to use. The score is equivalent to
    57     /// Mann-Whitney statistics.
    58     /// @return the area under the ROC curve. If the area is less
    59     /// than 0.5 and absolute=true, 1-area is returned. Complexity is
    60     /// \f$ N\log N \f$ where \f$ N \f$ is number of samples.
    61     ///
     70    /**
     71       \return area under the ROC curve.
     72    */
    6273    double score(const classifier::Target& target,
    6374                 const utility::VectorBase& value) const;
    6475   
    65     /**
    66         Function taking values, target, weight and a vector defining
    67         what samples to use. The area is defines as \f$ \frac{\sum
    68         w^+w^-}{\sum w^+w^-}\f$, where the sum in the numerator goes
    69         over all pairs where value+ is larger than value-. The
    70         denominator goes over all pairs. If target is equal to 1,
    71         sample belonges to class + otherwise sample belongs to class
    72         -. @return wheighted version of area under the ROC curve. If
    73         the area is less than 0.5 and absolute=true, 1-area is
    74         returned. Complexity is \f$ N^2 \f$ where \f$ N \f$ is number
    75         of samples.
     76    /**
     77       \return area under the ROC curve.
    7678    */
    7779    double score(const classifier::Target& target,
    7880                 const classifier::DataLookupWeighted1D& value) const;
    7981
    80     /**
    81         Function taking values, target, weight and a vector defining
    82         what samples to use. The area is defines as \f$ \frac{\sum
    83         w^+w^-}{\sum w^+w^-}\f$, where the sum in the numerator goes
    84         over all pairs where value+ is larger than value-. The
    85         denominator goes over all pairs. If target is equal to 1,
    86         sample belonges to class + otherwise sample belongs to class
    87         -. @return wheighted version of area under the ROC curve. If
    88         the area is less than 0.5 and absolute=true, 1-area is
    89         returned. Complexity is \f$ N^2 \f$ where \f$ N \f$ is number
    90         of samples.
     82    /**
     83       \return area under the ROC curve.
    9184    */
    9285    double score(const classifier::Target& target,
     
    9992    typedef std::multimap<double, std::pair<bool, double> > MultiMap;
    10093    double score(const MultiMap&) const;
    101    
    10294  };
    10395
Note: See TracChangeset for help on using the changeset viewer.