yat  0.21pre
CrossValidationSampler.h
1 #ifndef _theplu_yat_classifier_crossvalidation_sampler_
2 #define _theplu_yat_classifier_crossvalidation_sampler_
3 
4 // $Id: CrossValidationSampler.h 4207 2022-08-26 04:36:28Z peter $
5 
6 /*
7  Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér
8  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2022 Peter Johansson
10 
11  This file is part of the yat library, http://dev.thep.lu.se/yat
12 
13  The yat library is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License as
15  published by the Free Software Foundation; either version 3 of the
16  License, or (at your option) any later version.
17 
18  The yat library is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with yat. If not, see <http://www.gnu.org/licenses/>.
25 */
26 
27 #include "Sampler.h"
28 
29 namespace theplu {
30 namespace yat {
31 namespace classifier {
32 
33  class Target;
34 
47  {
48 
49  public:
57  CrossValidationSampler(const Target& target, const size_t N,const size_t k);
58 
62  virtual ~CrossValidationSampler();
63 
64  private:
65  void build(const Target& target, size_t N, size_t k);
66  const size_t k_;
67 
68  };
69 
70 }}} // of namespace classifier, yat, and theplu
71 #endif
Class for containing sample labels.
Definition: Target.h:47
The Department of Theoretical Physics namespace as we define it.
const Target & target(void) const
Class splitting a set into training set and validation set in a crossvalidation manner.
Definition: CrossValidationSampler.h:46
CrossValidationSampler(const Target &target, const size_t N, const size_t k)
Constructor.
Interface class for dividing samples into training and validation.
Definition: Sampler.h:40

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14