Go to the documentation of this file.00001 #ifndef _WEIGHTEDDEGREERBFKERNEL_H___
00002 #define _WEIGHTEDDEGREERBFKERNEL_H___
00003
00004 #include <shogun/lib/common.h>
00005 #include <shogun/kernel/DotKernel.h>
00006 #include <shogun/features/SimpleFeatures.h>
00007
00008 namespace shogun
00009 {
00010
00012 class CWeightedDegreeRBFKernel: public CDotKernel
00013 {
00014 public:
00018 CWeightedDegreeRBFKernel();
00019
00027 CWeightedDegreeRBFKernel(int32_t size, float64_t width, int32_t degree, int32_t nof_properties);
00028
00038 CWeightedDegreeRBFKernel(CSimpleFeatures<float64_t>* l, CSimpleFeatures<float64_t>* r,
00039 float64_t width, int32_t degree, int32_t nof_properties, int32_t size=10);
00040
00041 virtual ~CWeightedDegreeRBFKernel();
00042
00049 virtual bool init(CFeatures* l, CFeatures* r);
00050
00055
00056 virtual EKernelType get_kernel_type() { return K_WEIGHTEDDEGREERBF; }
00057
00062 inline virtual const char* get_name() const { return "WeightedDegreeRBFKernel"; }
00063
00064
00069 inline virtual EFeatureClass get_feature_class() { return C_SIMPLE; }
00070
00075 virtual EFeatureType get_feature_type() { return F_DREAL; }
00076
00077
00083 inline bool set_degree(int32_t deg) { degree=deg; return true; }
00084
00089 inline int32_t get_degree() { return degree; }
00090
00091 protected:
00100 virtual float64_t compute(int32_t idx_a, int32_t idx_b);
00101
00106 bool init_wd_weights();
00107
00108 protected:
00110 float64_t width;
00111
00113 int32_t degree;
00114
00116 int32_t nof_properties;
00117
00120 float64_t* weights;
00121
00122 };
00123 }
00124 #endif