random-selector.h

Go to the documentation of this file.
00001 // Copyright 2007, Massachusetts Institute of Technology.
00002 // The use of this code is permitted for research only. There is
00003 // absolutely no warranty for this software.
00004 //
00005 // Author: John Lee (jjl@mit.edu)
00006 //
00007 // Chooses <num_train_per_class> examples randomly, per class, to use as
00008 // training, and uses the remaining examples as testing.
00009 
00010 #ifndef EXPERIMENT_RANDOM_SELECTOR_H
00011 #define EXPERIMENT_RANDOM_SELECTOR_H
00012 
00013 #include "experiment/example-selector.h"
00014 
00015 using namespace libpmk;
00016 
00017 namespace libpmk_util {
00018 
00020 class RandomSelector : public ExampleSelector {
00021 public:
00022   RandomSelector(const vector<int>& labels, int num_train_per_class);
00023 
00024 protected:
00025   virtual void SelectExamples();
00026 
00027 private:
00028   int num_train_per_class_;
00029 };
00030 }  // namespace libpmk_util
00031 #endif  // EXPERIMENT_RANDOM_SELECTOR_H

Generated on Fri Sep 21 11:39:04 2007 for libpmk2 by  doxygen 1.5.1