Ignore:
Timestamp:
Dec 22, 2005, 4:03:51 PM (16 years ago)
Author:
Peter
Message:

I dont know what happened, but everything is changed...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/statistics/Fisher.h

    r449 r475  
    6464    ///
    6565    /// Cutoff sets the limit whether a value should go into the left
    66     /// or the right column. @see score
    67     ///
    68     /// @return reference to cutoff for column
    69     ///
    70     inline double& cutoff_column(void) { return cutoff_column_; }
    71 
    72     ///
    73     /// Cutoff sets the limit whether a value should go into the left
    7466    /// or the right row. @see score
    7567    ///
    7668    /// @return reference to cutoff for row
    7769    ///
    78     inline double& cutoff_row(void) { return cutoff_row_; }
     70    inline double& value_cutoff(void) { return value_cutoff_; }
    7971
    8072    ///
     
    9991    /// @return p-value
    10092    ///
     93    /// @note in weighted case, approximation Chi2 is always used.
     94    ///
    10195    double p_value() const;
    10296   
     
    10498    /// Function calculating score from 2x2 table for which the
    10599    /// elements are calculated as follows \n
    106     /// a: #data \f$ x=1 \f$ AND \f$ y=1 \f$ \n
    107     /// b: #data \f$ x=-1 \f$ AND \f$ y=1 \f$ \n
    108     /// c: #data \f$ x=1 \f$ AND \f$ y=-1 \f$ \n
    109     /// d: #data \f$ x=-1 \f$ AND \f$ y=1 \f$ \n
     100    /// target=positive_label (a,c)
     101    /// \f$ value > \f$ value_cutoff() a,b \n
    110102    ///
    111103    /// @return odds ratio. If absolute_ is true and odds ratio is
    112104    /// less than unity 1 divided by odds ratio is returned
    113105    ///
    114     double score(const gslapi::vector& x, const gslapi::vector& y, 
    115                  const std::vector<size_t>& = std::vector<size_t>());
     106    double score(const classifier::Target& target,
     107                 const gslapi::vector& value);
    116108
    117109    ///
     
    122114    /// @return odds ratio
    123115    ///
    124     /// @note
     116    /// @see score
    125117    ///
    126     double score(const gslapi::vector& x, const gslapi::vector& y, 
    127                  const gslapi::vector& w,
    128                  const std::vector<size_t>& = std::vector<size_t>());
     118    double score(const classifier::Target& target,
     119                 const gslapi::vector& value,
     120                 const gslapi::vector& weight);
    129121
    130122    ///
     
    148140    double p_value_exact(void) const;
    149141
    150     std::vector<size_t> train_set_;
    151     gslapi::vector weight_;
    152     u_int a_;
    153     u_int b_;
    154     u_int c_;
    155     u_int d_;
    156     double cutoff_column_;
    157     double cutoff_row_;
     142    double a_;
     143    double b_;
     144    double c_;
     145    double d_;
    158146    u_int minimum_size_;
    159147    double oddsratio_;
     148    double value_cutoff_;
    160149  };
    161150
Note: See TracChangeset for help on using the changeset viewer.