Changeset 187


Ignore:
Timestamp:
Oct 18, 2004, 6:06:05 PM (17 years ago)
Author:
Peter
Message:

fixed bug with inheritance of p_value()

Location:
trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Fisher.cc

    r186 r187  
    3939
    4040
    41   double Fisher::p_value()
     41  double Fisher::p_value() const
    4242  {
    4343    // Since the calculation is symmetric and cdf_hypergeometric_P
  • trunk/src/Fisher.h

    r186 r187  
    6262    /// @return p-value
    6363    ///
    64     double p_value();
     64    double p_value() const;
    6565   
    6666    ///
  • trunk/src/Pearson.cc

    r186 r187  
    2828  }
    2929
    30   double Pearson::p_value();
     30  double Pearson::p_value() const;
    3131  {
    3232    if(weighted_)
  • trunk/src/Pearson.h

    r186 r187  
    7474                 const std::vector<size_t>& = std::vector<size_t>());
    7575   
    76     ///
    77     /// @return 1 if data correlates with target, other wise -1
    78     ///
    79     inline int sign(void) {return (r_>0) ? 1 : -1; } 
    80    
    81          
    8276    ///
    8377    /// The p-value is the probability of getting a correlation as
     
    8781    /// score. @return two-sided p-value
    8882    ///
    89     double p_value();
     83    double p_value() const;
    9084         
    9185  private:
  • trunk/src/ROC.cc

    r186 r187  
    4343
    4444  double ROC::get_p_exact(const double block, const double nof_pos,
    45                             const double nof_neg)
     45                          const double nof_neg) const
    4646  {
    4747    double p;
     
    5858  }
    5959
    60   double ROC::p_value(void)
     60  double ROC::p_value(void) const
    6161  {
    6262    if (!weighted_)
  • trunk/src/ROC.h

    r186 r187  
    7272    ///to the two-sided p-value.)
    7373    ///
    74     double p_value(void) ;
     74    double p_value(void) const;
    7575         
    7676    ///
     
    107107    ///
    108108    double ROC::get_p_exact(const double, const double,
    109                             const double);
     109                            const double) const;
    110110 
    111111    ///
  • trunk/src/Score.h

    r186 r187  
    4242          const std::vector<size_t>& = std::vector<size_t>()) = 0;
    4343
    44     virtual double p_value() const = 0;
     44    virtual double p_value(void) const = 0;
    4545 
    4646   
  • trunk/src/tScore.cc

    r186 r187  
    8080  }
    8181
    82   double tScore::p_value(void)
     82  double tScore::p_value(void) const
    8383  {
    8484    double dof = target_.size()-2;
  • trunk/src/tScore.h

    r181 r187  
    6262    ///absolute=true is used the two-sided p-value)
    6363    ///
    64     double p_value();
     64    double p_value() const;
    6565
    6666         
Note: See TracChangeset for help on using the changeset viewer.