Last change
on this file since 115 was
115,
checked in by Peter, 19 years ago
|
added
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
725 bytes
|
Line | |
---|
1 | // $Id: CrossValidation.h 115 2004-07-19 14:38:43Z peter $ |
---|
2 | |
---|
3 | #ifndef _theplu_cpptools_crossvalidation_ |
---|
4 | #define _theplu_cpptools_crossvalidation_ |
---|
5 | |
---|
6 | // C++ tools include |
---|
7 | ///////////////////// |
---|
8 | |
---|
9 | // Standard C++ includes |
---|
10 | //////////////////////// |
---|
11 | #include <vector> |
---|
12 | |
---|
13 | namespace theplu { |
---|
14 | namespace cpptools { |
---|
15 | |
---|
16 | /// |
---|
17 | /// Class splitting a set into training set and validation set in a |
---|
18 | /// crossvalidation manner. |
---|
19 | /// |
---|
20 | class CrossValidation |
---|
21 | { |
---|
22 | |
---|
23 | public: |
---|
24 | /// |
---|
25 | /// Constructor |
---|
26 | /// |
---|
27 | CrossValidation(const size_t, const size_t = 3); |
---|
28 | |
---|
29 | /// |
---|
30 | /// Function generating a training set |
---|
31 | /// |
---|
32 | std::vector<size_t> next(); |
---|
33 | |
---|
34 | private: |
---|
35 | int count_; |
---|
36 | std::vector<size_t> index_; |
---|
37 | int k_; |
---|
38 | |
---|
39 | |
---|
40 | }; |
---|
41 | |
---|
42 | }} // of namespace cpptools and namespace theplu |
---|
43 | |
---|
44 | #endif |
---|
45 | |
---|
Note: See
TracBrowser
for help on using the repository browser.