Changeset 823
- Timestamp:
- Mar 19, 2007, 12:03:27 PM (17 years ago)
- Location:
- trunk/yat/classifier
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/CrossValidationSampler.cc
r680 r823 38 38 const size_t N, 39 39 const size_t k) 40 : Sampler(target ), k_(k)40 : Sampler(target, N), k_(k) 41 41 { 42 42 assert(target.size()>1); -
trunk/yat/classifier/CrossValidationSampler.h
r767 r823 29 29 namespace theplu { 30 30 namespace yat { 31 namespace classifier { 31 namespace classifier { 32 32 33 33 class Target; … … 42 42 /// samples are shuffled and... In total there are N partitions, in 43 43 /// other words, each sample is in validation roughly N/k 44 ///45 46 47 48 49 50 51 /// 44 /// 45 class CrossValidationSampler : public Sampler 46 { 47 48 public: 49 /// 50 /// @brief Constructor 51 /// 52 52 /// @a target targets. 53 53 /// @a N total number of partitions. -
trunk/yat/classifier/Makefile.am
r675 r823 24 24 noinst_LTLIBRARIES = libclassifier.la 25 25 libclassifier_la_SOURCES = \ 26 BootstrapSampler.cc \ 26 27 ConsensusInputRanker.cc \ 27 28 CrossValidationSampler.cc \ … … 60 61 61 62 include_classifier_HEADERS = \ 63 BootstrapSampler.h \ 62 64 ConsensusInputRanker.h \ 63 65 CrossValidationSampler.h \ -
trunk/yat/classifier/Sampler.cc
r720 r823 29 29 namespace classifier { 30 30 31 Sampler::Sampler(const Target& target )31 Sampler::Sampler(const Target& target, size_t N) 32 32 : target_(target) 33 33 { 34 training_index_.reserve(N); 35 training_target_.reserve(N); 36 validation_index_.reserve(N); 37 validation_target_.reserve(N); 34 38 } 35 39 -
trunk/yat/classifier/Sampler.h
r767 r823 36 36 /// @brief Interface class for dividing samples into training and 37 37 /// validation. 38 38 /// 39 39 40 41 42 43 44 45 46 /// 40 class Sampler 41 { 42 43 public: 44 /// 45 /// @brief Constructor 46 /// 47 47 /// @param target used to balance partitions 48 /// @param Number of partitions 48 49 /// 49 Sampler(const Target& target );50 Sampler(const Target& target, size_t N); 50 51 51 52 ///
Note: See TracChangeset
for help on using the changeset viewer.