Changeset 529
- Timestamp:
- Mar 1, 2006, 3:03:27 PM (17 years ago)
- Location:
- trunk/lib/statistics
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/statistics/Makefile.am
r503 r529 15 15 MultiDimensional.cc Naive.cc NaiveWeighted.cc OneDimensional.cc\ 16 16 Pearson.cc PearsonDistance.cc \ 17 Polynomial.cc ROC.cc Score.cc tScore.cc utility.cc \17 Polynomial.cc ROC.cc Score.cc tScore.cc SNR.cc utility.cc \ 18 18 WilcoxonFoldChange.cc 19 19 … … 28 28 Local.h MultiDimensional.h Naive.h NaiveWeighted.h OneDimensional.h \ 29 29 OneDimensionalWeighted.h Pearson.h PearsonDistance.h \ 30 Polynomial.h ROC.h Score.h tScore.h \30 Polynomial.h ROC.h Score.h SNR.h tScore.h \ 31 31 utility.h WilcoxonFoldChange.h -
trunk/lib/statistics/Score.cc
r509 r529 7 7 8 8 Score::Score(bool absolute) 9 : absolute_(absolute) 9 : absolute_(absolute), weighted_(false) 10 10 { 11 11 } -
trunk/lib/statistics/Score.h
r509 r529 79 79 /// @param value vector of the values 80 80 /// @param weight vector of accompanied weight to the values 81 /// @train_set defining which values to use (number of values used82 /// in the calculation is equal to size of \a train_set)83 81 /// 84 82 virtual double … … 99 97 /// @param value vector of the values 100 98 /// @param weight vector of accompanied weight to the values 101 /// @train_set defining which values to use (number of values used102 /// in the calculation is equal to size of \a train_set)103 99 /// 104 100 inline double -
trunk/lib/statistics/tScore.cc
r526 r529 50 50 statistics::AveragerWeighted positive; 51 51 statistics::AveragerWeighted negative; 52 dof_=target.size()-2;53 52 for(size_t i=0; i<target.size(); i++){ 54 53 if (target.binary(i)) … … 60 59 double s2=(positive.sum_xx_centered()+negative.sum_xx_centered())/ 61 60 (positive.n()+negative.n()-2); 62 t_=diff/sqrt(s2*(1.0/positive.sum_w()+1.0/negative.sum_w())); 61 t_=diff/sqrt(s2*(1.0/positive.sum_w()+1.0/negative.sum_w())); 63 62 if (t_<0 && absolute_) 64 63 t_=-t_; 64 65 if(positive.n()==0 || negative.n()==0 || 66 positive.sum_w()==0 || positive.sum_w()==0) 67 t_=0; 68 dof_=target.size()-2; 65 69 66 70 return t_; -
trunk/lib/statistics/tScore.h
r492 r529 42 42 /// 43 43 /// Weighted version of t-Score @return t-score if absolute=true 44 /// absolute value of t-score is returned 44 /// absolute value of t-score is returned. 45 /// @todo Peter: This is probably 46 /// not implemented as it should be! 45 47 /// 46 48 double score(const classifier::Target& target,
Note: See TracChangeset
for help on using the changeset viewer.