Changeset 779 for trunk/yat/classifier
- Timestamp:
- Mar 5, 2007, 7:58:30 PM (17 years ago)
- Location:
- trunk/yat/classifier
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/DataLookupWeighted1D.cc
r720 r779 78 78 79 79 80 double sum_weight(const DataLookupWeighted1D& x) 81 { 82 double r=0; 83 for (size_t i=0; i<x.size(); ++i) 84 r += x.weight(i); 85 return r; 86 } 87 88 80 89 double DataLookupWeighted1D::weight(const size_t i) const 81 90 { -
trunk/yat/classifier/DataLookupWeighted1D.h
r767 r779 105 105 }; 106 106 107 /// 108 /// @return sum of weights 109 /// 110 double sum_weight(const DataLookupWeighted1D&); 111 107 112 }}} // of namespace classifier, yat, and theplu 108 113 -
trunk/yat/classifier/InputRanker.cc
r720 r779 28 28 #include "DataLookupWeighted1D.h" 29 29 #include "Target.h" 30 #include "yat/statistics/ ROC.h"30 #include "yat/statistics/Score.h" 31 31 #include "yat/utility/stl_utility.h" 32 32 -
trunk/yat/classifier/utility.cc
r680 r779 24 24 #include "utility.h" 25 25 #include "DataLookup1D.h" 26 #include "DataLookupWeighted1D.h" 26 27 #include "yat/utility/vector.h" 27 28 … … 38 39 } 39 40 41 void convert(const DataLookupWeighted1D& lookup, utility::vector& value, 42 utility::vector& weight) 43 { 44 45 value=utility::vector(lookup.size()); 46 weight=utility::vector(lookup.size()); 47 for(u_int i=0; i<lookup.size(); i++){ 48 value(i)=lookup.data(i); 49 weight(i)=lookup.weight(i); 50 } 51 } 52 40 53 }}} // of namespace classifier, yat, and theplu -
trunk/yat/classifier/utility.h
r680 r779 35 35 36 36 class DataLookup1D; 37 class DataLookupWeighted1D; 37 38 38 39 /// … … 41 42 void convert(const DataLookup1D&, utility::vector&); 42 43 44 /// 45 /// Converts a DataLookupWeighted1D to two utility::vector 46 /// 47 void convert(const DataLookupWeighted1D&, utility::vector& value, 48 utility::vector& weight); 49 43 50 }}} // of namespace classifier, yat, and theplu 44 51
Note: See TracChangeset
for help on using the changeset viewer.