EmbeddingConverter.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2011 Sergey Lisitsyn
00008  * Copyright (C) 2011 Sergey Lisitsyn
00009  */
00010 
00011 #ifndef EMBEDDINGCONVERTER_H_
00012 #define EMBEDDINGCONVERTER_H_
00013 
00014 #include <shogun/converter/Converter.h>
00015 #include <shogun/features/Features.h>
00016 #include <shogun/features/DenseFeatures.h>
00017 #include <shogun/distance/Distance.h>
00018 #include <shogun/kernel/Kernel.h>
00019 
00020 namespace shogun
00021 {
00022 
00023 class CFeatures;
00024 class CDistance;
00025 class CKernel;
00026 
00031 class CEmbeddingConverter: public CConverter
00032 {
00033 public:
00034 
00036     CEmbeddingConverter();
00037 
00039     virtual ~CEmbeddingConverter();
00040 
00045     virtual CFeatures* apply(CFeatures* features) = 0;
00046 
00052     virtual CDenseFeatures<float64_t>* embed(CFeatures* features);
00053 
00057     void set_target_dim(int32_t dim);
00058 
00062     int32_t get_target_dim() const;
00063 
00067     void set_distance(CDistance* distance);
00068 
00072     CDistance* get_distance() const;
00073 
00077     void set_kernel(CKernel* kernel);
00078 
00082     CKernel* get_kernel() const;
00083 
00084     virtual const char* get_name() const { return "EmbeddingConverter"; };
00085 
00086 protected:
00087 
00089     void init();
00090 
00091 protected:
00092 
00094     int32_t m_target_dim;
00095 
00097     CDistance* m_distance;
00098 
00100     CKernel* m_kernel;
00101 };
00102 }
00103 
00104 #endif /* DIMENSIONREDUCTIONPREPROCESSOR_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation