yat
0.8.3pre
|
00001 #ifndef _theplu_yat_classifier_sampler_ 00002 #define _theplu_yat_classifier_sampler_ 00003 00004 // $Id: Sampler.h 2608 2011-11-01 02:47:32Z peter $ 00005 00006 /* 00007 Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér 00008 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 00009 00010 This file is part of the yat library, http://dev.thep.lu.se/yat 00011 00012 The yat library is free software; you can redistribute it and/or 00013 modify it under the terms of the GNU General Public License as 00014 published by the Free Software Foundation; either version 3 of the 00015 License, or (at your option) any later version. 00016 00017 The yat library is distributed in the hope that it will be useful, 00018 but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 General Public License for more details. 00021 00022 You should have received a copy of the GNU General Public License 00023 along with yat. If not, see <http://www.gnu.org/licenses/>. 00024 */ 00025 00026 #include "Target.h" 00027 #include "yat/utility/Index.h" 00028 00029 #include <vector> 00030 00031 namespace theplu { 00032 namespace yat { 00033 namespace classifier { 00034 00039 class Sampler 00040 { 00041 00042 public: 00049 Sampler(const Target& target, size_t N); 00050 00054 virtual ~Sampler() =0; 00055 00059 size_t size(void) const; 00060 00064 const Target& target(void) const; 00065 00069 const utility::Index& 00070 training_index(size_t i) const; 00071 00077 const Target& training_target(size_t i) const; 00078 00084 const utility::Index& validation_index(size_t i) const; 00085 00091 const Target& validation_target(size_t i) const; 00092 00093 protected: 00095 std::vector<utility::Index> training_index_; 00097 std::vector<Target> training_target_; 00099 std::vector<utility::Index> validation_index_; 00101 std::vector<Target> validation_target_; 00102 00103 private: 00104 Target target_; 00105 }; 00106 00107 }}} // of namespace classifier, yat, and theplu 00108 #endif