SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
KernelPCA.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2011 Soeren Sonnenburg
8  * Copyright (C) 2011 Berlin Institute of Technology
9  */
10 
11 #ifndef KERNELPCA_H__
12 #define KERNELPCA_H__
13 #include <shogun/lib/config.h>
14 #ifdef HAVE_LAPACK
15 
18 #include <shogun/kernel/Kernel.h>
19 #include <shogun/lib/common.h>
20 
21 namespace shogun
22 {
23 
24 class CFeatures;
25 class CKernel;
26 
36 {
37 public:
40  CKernelPCA();
41 
45  CKernelPCA(CKernel* k);
46 
47  virtual ~CKernelPCA();
48 
50  virtual bool init(CFeatures* features);
52  virtual void cleanup();
53 
58 
62 
67 
72  {
74  }
75 
80  {
81  return m_bias_vector;
82  }
83 
85  virtual const char* get_name() const { return "KernelPCA"; }
86 
88  virtual EPreprocessorType get_type() const { return P_KERNELPCA; }
89 
90  protected:
91 
93  void init();
94 
95  protected:
96 
99 
102 
105 
108 
109 };
110 }
111 #endif
112 #endif
SGMatrix< float64_t > get_transformation_matrix() const
Definition: KernelPCA.h:71
the class DimensionReductionPreprocessor, a base class for preprocessors used to lower the dimensiona...
SGVector< float64_t > m_bias_vector
Definition: KernelPCA.h:104
virtual SGVector< float64_t > apply_to_feature_vector(SGVector< float64_t > vector)
Definition: KernelPCA.cpp:161
EPreprocessorType
Definition: Preprocessor.h:32
virtual SGMatrix< float64_t > apply_to_feature_matrix(CFeatures *features)
Definition: KernelPCA.cpp:129
virtual void cleanup()
cleanup
Definition: KernelPCA.cpp:52
virtual CDenseFeatures< float64_t > * apply_to_string_features(CFeatures *features)
Definition: KernelPCA.cpp:186
virtual ~CKernelPCA()
Definition: KernelPCA.cpp:63
virtual EPreprocessorType get_type() const
Definition: KernelPCA.h:88
CFeatures * m_init_features
Definition: KernelPCA.h:98
SGMatrix< float64_t > m_transformation_matrix
Definition: KernelPCA.h:101
SGVector< float64_t > get_bias_vector() const
Definition: KernelPCA.h:79
virtual const char * get_name() const
Definition: KernelPCA.h:85
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
Preprocessor KernelPCA performs kernel principal component analysis.
Definition: KernelPCA.h:35
The class Features is the base class of all feature objects.
Definition: Features.h:68
The Kernel base class.
Definition: Kernel.h:159

SHOGUN Machine Learning Toolbox - Documentation