yat  0.21pre
FeatureSelector.h
1 #ifndef _theplu_yat_classifier_featureselector_
2 #define _theplu_yat_classifier_featureselector_
3 
4 // $Id: FeatureSelector.h 4207 2022-08-26 04:36:28Z peter $
5 
6 /*
7  Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2022 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 "yat/utility/Index.h"
27 
28 #include <list>
29 
30 namespace theplu {
31 namespace yat {
32 namespace classifier {
33  class MatrixLookup;
34  class MatrixLookupWeighted;
35  class Target;
36 
41  {
42  public:
46  FeatureSelector(size_t N, size_t skip=0);
47 
51  virtual ~FeatureSelector(void);
52 
56  const MatrixLookup get(const MatrixLookup& data);
57 
61  const MatrixLookupWeighted get(const MatrixLookupWeighted& data);
62 
66  const utility::Index features(void) const;
67 
71  virtual void update(const MatrixLookup& matrix, const Target& target)=0;
72 
76  virtual void update(const MatrixLookupWeighted& matrix,
77  const Target& target)=0;
78 
79  protected:
84 
88  size_t first_;
89 
93  size_t N_;
94 
95  private:
96 
97  };
98 
99 }}} // of namespace classifier, yat, and theplu
100 
101 #endif
General view into utility::Matrix.
Definition: MatrixLookup.h:70
Class for containing sample labels.
Definition: Target.h:47
The Department of Theoretical Physics namespace as we define it.
Interface class for FeatureSelection.
Definition: FeatureSelector.h:40
utility::Index features_
features
Definition: FeatureSelector.h:83
Class for storing indices of, e.g., a MatrixLookup.
Definition: Index.h:41
size_t N_
Definition: FeatureSelector.h:93
General view into utility::MatrixWeighted.
Definition: MatrixLookupWeighted.h:63
FeatureSelector(size_t N, size_t skip=0)
Default Constructor.
virtual ~FeatureSelector(void)
Destructor.
size_t first_
Definition: FeatureSelector.h:88
const utility::Index features(void) const
virtual void update(const MatrixLookup &matrix, const Target &target)=0

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