Go to the documentation of this file.00001 #ifndef _WEIGHTEDDEGREERBFKERNEL_H___
00002 #define _WEIGHTEDDEGREERBFKERNEL_H___
00003
00004 #include "lib/common.h"
00005 #include "kernel/DotKernel.h"
00006 #include "features/SimpleFeatures.h"
00007
00008 namespace shogun
00009 {
00010
00011 class CWeightedDegreeRBFKernel: public CDotKernel
00012 {
00013 public:
00017 CWeightedDegreeRBFKernel();
00018
00026 CWeightedDegreeRBFKernel(int32_t size, float64_t width, int32_t degree, int32_t nof_properties);
00027
00037 CWeightedDegreeRBFKernel(CSimpleFeatures<float64_t>* l, CSimpleFeatures<float64_t>* r,
00038 float64_t width, int32_t degree, int32_t nof_properties, int32_t size=10);
00039
00040 virtual ~CWeightedDegreeRBFKernel();
00041
00048 virtual bool init(CFeatures* l, CFeatures* r);
00049
00054
00055 virtual EKernelType get_kernel_type() { return K_WEIGHTEDDEGREERBF; }
00056
00061 inline virtual const char* get_name() const { return "WeightedDegreeRBFKernel"; }
00062
00063
00068 inline virtual EFeatureClass get_feature_class() { return C_SIMPLE; }
00069
00074 virtual EFeatureType get_feature_type() { return F_DREAL; }
00075
00076
00082 inline bool set_degree(int32_t deg) { degree=deg; return true; }
00083
00088 inline int32_t get_degree() { return degree; }
00089
00090 protected:
00099 virtual float64_t compute(int32_t idx_a, int32_t idx_b);
00100
00105 bool init_wd_weights();
00106
00107 protected:
00109 float64_t width;
00110
00112 int32_t degree;
00113
00115 int32_t nof_properties;
00116
00119 float64_t* weights;
00120
00121 };
00122 }
00123 #endif