Changeset 560
- Timestamp:
- Mar 13, 2006, 3:36:54 PM (17 years ago)
- Location:
- trunk/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/classifier/ConsensusInputRanker.cc
r558 r560 16 16 #include <utility> 17 17 #include <vector> 18 18 #include <cmath> 19 19 20 20 namespace theplu { … … 32 32 input_rankers_.push_back(InputRanker(sampler.training_data(), 33 33 sampler.training_target(), 34 score_object)); 34 score_object, 35 sampler.training_weight())); 35 36 } 36 37 else{ 37 38 input_rankers_.push_back(InputRanker(sampler.training_data(), 38 39 sampler.training_target(), 39 score_object)); 40 score_object)); 40 41 } 41 42 sampler.next(); -
trunk/lib/classifier/CrossSplitter.h
r558 r560 115 115 /// @note if state is invalid the result is undefined 116 116 /// 117 inline const DataLookup2D& training_weight(void) const117 inline const MatrixLookup& training_weight(void) const 118 118 { assert(more()); return *(training_weight_[state_]); } 119 119 … … 147 147 /// @note if state is invalid the result is undefined 148 148 /// 149 inline const DataLookup2D& validation_weight(void) const149 inline const MatrixLookup& validation_weight(void) const 150 150 { assert(more()); return *(validation_weight_[state_]); } 151 151 -
trunk/lib/classifier/InputRanker.cc
r536 r560 13 13 #include <vector> 14 14 15 #include <cmath> 15 16 16 17 namespace theplu { … … 59 60 for (size_t i=0; i<nof_genes; i++) { 60 61 double area = score_object.score(target, DataLookup1D(data,i,true), 61 DataLookup1D(weight,i,true)); 62 DataLookup1D(weight,i,true)); 63 assert(!std::isnan(area)); 62 64 std::pair<double, size_t> tmp(area,i); 63 65 score.push_back(tmp); -
trunk/lib/classifier/MatrixLookup.h
r556 r560 85 85 86 86 /// 87 /// Constructor taking the column (default) or row index vectoras87 /// Constructor taking the column or row index vector (default) as 88 88 /// input. If @a row is false the created MatrixLookup will have 89 89 /// equally many rows as @a matrix. … … 94 94 /// 95 95 MatrixLookup(const MatrixLookup& matrix, const std::vector<size_t>&, 96 const bool row =false);96 const bool row_vectors=true); 97 97 98 98 /// -
trunk/lib/statistics/SNR.cc
r530 r560 53 53 double diff = positive.mean() - negative.mean(); 54 54 double denom=positive.std()+negative.std(); 55 assert(denom); 55 56 score_=diff/denom; 56 57 if(positive.sum_w()==0 || negative.sum_w()==0)
Note: See TracChangeset
for help on using the changeset viewer.