SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 
14 #include <shogun/lib/config.h>
15 
20 #include <shogun/kernel/Kernel.h>
21 
22 namespace shogun
23 {
24 
25 class CFeatures;
26 class CDistance;
27 class CKernel;
28 
34 {
35 public:
36 
39 
41  virtual ~CEmbeddingConverter();
42 
47  virtual CFeatures* apply(CFeatures* features) = 0;
48 
54  virtual CDenseFeatures<float64_t>* embed(CFeatures* features);
55 
59  void set_target_dim(int32_t dim);
60 
64  int32_t get_target_dim() const;
65 
70 
74  CDistance* get_distance() const;
75 
79  void set_kernel(CKernel* kernel);
80 
84  CKernel* get_kernel() const;
85 
86  virtual const char* get_name() const { return "EmbeddingConverter"; };
87 
88 protected:
89 
91  void init();
92 
93 protected:
94 
96  int32_t m_target_dim;
97 
100 
103 };
104 }
105 
106 #endif /* DIMENSIONREDUCTIONPREPROCESSOR_H_ */

SHOGUN Machine Learning Toolbox - Documentation