Changeset 543
- Timestamp:
- Mar 5, 2006, 5:42:38 PM (17 years ago)
- Location:
- trunk/lib/classifier
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/classifier/NCC.cc
r527 r543 36 36 NCC::~NCC() 37 37 { 38 if(ranker_)39 delete ranker_;40 38 } 41 39 -
trunk/lib/classifier/SVM.cc
r542 r543 7 7 #include <c++_tools/gslapi/vector.h> 8 8 #include <c++_tools/statistics/Averager.h> 9 #include <c++_tools/statistics/Score.h> 9 10 #include <c++_tools/random/random.h> 10 11 … … 29 30 output_(target.size(),0), 30 31 sample_(target.size()), 31 target_(target),32 32 trained_(false), 33 33 tolerance_(0.00000001) 34 34 { 35 35 } 36 37 SVM::SVM(const KernelLookup& kernel, const Target& target, 38 statistics::Score& score, const size_t nof_inputs) 39 : SupervisedClassifier(target, &score, nof_inputs), 40 alpha_(target.size(),0), 41 bias_(0), 42 C_inverse_(0), 43 kernel_(&kernel), 44 max_epochs_(10000000), 45 output_(target.size(),0), 46 sample_(target.size()), 47 trained_(false), 48 tolerance_(0.00000001) 49 { 50 } 51 52 36 53 37 54 SupervisedClassifier* SVM::make_classifier(const DataLookup2D& data, -
trunk/lib/classifier/SVM.h
r542 r543 111 111 SVM(const KernelLookup& kernel, const Target& target); 112 112 113 /// 114 /// Constructor taking the kernel, the target vector, the score 115 /// used to rank data inputs, and the number of top ranked data 116 /// inputs to use in the classification. 117 /// 118 /// @note if the @a target or @a kernel 119 /// is destroyed the behaviour is undefined. 120 /// 121 /// @note make no effect yet 122 SVM(const KernelLookup& kernel, const Target& target, 123 statistics::Score&, const size_t); 124 113 125 /// 114 126 /// @todo doc … … 240 252 gslapi::vector output_; 241 253 Index sample_; 242 const Target& target_;243 254 bool trained_; 244 255 double tolerance_; -
trunk/lib/classifier/SupervisedClassifier.cc
r526 r543 2 2 3 3 #include <c++_tools/classifier/SupervisedClassifier.h> 4 #include <c++_tools/classifier/InputRanker.h> 4 5 5 6 namespace theplu { … … 12 13 } 13 14 14 15 SupervisedClassifier::SupervisedClassifier(const Target& target, 15 16 statistics::Score* score, 16 17 const size_t nof_inputs) … … 20 21 } 21 22 23 SupervisedClassifier::~SupervisedClassifier() 24 { 25 if(ranker_) 26 delete ranker_; 27 } 28 22 29 23 30 }} -
trunk/lib/classifier/SupervisedClassifier.h
r526 r543 48 48 /// Destructor 49 49 /// 50 virtual ~SupervisedClassifier() {};50 virtual ~SupervisedClassifier(); 51 51 52 52 ///
Note: See TracChangeset
for help on using the changeset viewer.