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/SimpleFeatures.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 
00030 class CEmbeddingConverter: public CConverter
00031 {
00032 public:
00033 
00035     CEmbeddingConverter();
00036 
00038     virtual ~CEmbeddingConverter();
00039 
00044     virtual CFeatures* apply(CFeatures* features) = 0;
00045 
00051     virtual CSimpleFeatures<float64_t>* embed(CFeatures* features);
00052 
00056     void set_target_dim(int32_t dim);
00057 
00061     int32_t get_target_dim() const;
00062 
00066     void set_distance(CDistance* distance);
00067 
00071     CDistance* get_distance() const;
00072 
00076     void set_kernel(CKernel* kernel);
00077 
00081     CKernel* get_kernel() const;
00082 
00083     virtual const char* get_name() const { return "EmbeddingConverter"; };
00084 
00085 protected:
00086 
00088     void init();
00089 
00090 protected:
00091 
00093     int32_t m_target_dim;
00094 
00096     CDistance* m_distance;
00097 
00099     CKernel* m_kernel;
00100 };
00101 }
00102 
00103 #endif /* DIMENSIONREDUCTIONPREPROCESSOR_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation