yat
0.10.4pre
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scratch
bob
jari
tmp
pristine
yat-0.10.x
yat
classifier
Sampler.h
1
#ifndef _theplu_yat_classifier_sampler_
2
#define _theplu_yat_classifier_sampler_
3
4
// $Id: Sampler.h 2608 2011-11-01 02:47:32Z 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
10
This file is part of the yat library, http://dev.thep.lu.se/yat
11
12
The yat library is free software; you can redistribute it and/or
13
modify it under the terms of the GNU General Public License as
14
published by the Free Software Foundation; either version 3 of the
15
License, or (at your option) any later version.
16
17
The yat library is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
General Public License for more details.
21
22
You should have received a copy of the GNU General Public License
23
along with yat. If not, see <http://www.gnu.org/licenses/>.
24
*/
25
26
#include "Target.h"
27
#include "yat/utility/Index.h"
28
29
#include <vector>
30
31
namespace
theplu {
32
namespace
yat {
33
namespace
classifier {
34
39
class
Sampler
40
{
41
42
public
:
49
Sampler
(
const
Target
&
target
,
size_t
N);
50
54
virtual
~Sampler
() =0;
55
59
size_t
size
(
void
)
const
;
60
64
const
Target
&
target
(
void
)
const
;
65
69
const
utility::Index
&
70
training_index
(
size_t
i)
const
;
71
77
const
Target
&
training_target
(
size_t
i)
const
;
78
84
const
utility::Index
&
validation_index
(
size_t
i)
const
;
85
91
const
Target
&
validation_target
(
size_t
i)
const
;
92
93
protected
:
95
std::vector<utility::Index>
training_index_
;
97
std::vector<Target>
training_target_
;
99
std::vector<utility::Index>
validation_index_
;
101
std::vector<Target>
validation_target_
;
102
103
private
:
104
Target
target_;
105
};
106
107
}}}
// of namespace classifier, yat, and theplu
108
#endif
Generated on Mon Nov 11 2013 09:41:44 for yat by
1.8.1