SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EmbeddingConverter.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 Sergey Lisitsyn
8  * Copyright (C) 2011 Sergey Lisitsyn
9  */
10 
11 #ifndef EMBEDDINGCONVERTER_H_
12 #define EMBEDDINGCONVERTER_H_
13 
18 #include <shogun/kernel/Kernel.h>
19 
20 namespace shogun
21 {
22 
23 class CFeatures;
24 class CDistance;
25 class CKernel;
26 
31 {
32 public:
33 
36 
38  virtual ~CEmbeddingConverter();
39 
44  virtual CFeatures* apply(CFeatures* features) = 0;
45 
51  virtual CSimpleFeatures<float64_t>* embed(CFeatures* features);
52 
56  void set_target_dim(int32_t dim);
57 
61  int32_t get_target_dim() const;
62 
66  void set_distance(CDistance* distance);
67 
71  CDistance* get_distance() const;
72 
76  void set_kernel(CKernel* kernel);
77 
81  CKernel* get_kernel() const;
82 
83  virtual const char* get_name() const { return "EmbeddingConverter"; };
84 
85 protected:
86 
88  void init();
89 
90 protected:
91 
93  int32_t m_target_dim;
94 
97 
100 };
101 }
102 
103 #endif /* DIMENSIONREDUCTIONPREPROCESSOR_H_ */

SHOGUN Machine Learning Toolbox - Documentation