SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
GaussianARDKernel.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) 2012 Jacob Walker
00008  *
00009  * Adapted from WeightedDegreeRBFKernel.h
00010  */
00011 
00012 #ifndef GAUSSIANARDKERNEL_H_
00013 #define GAUSSIANARDKERNEL_H_
00014 
00015 #include <shogun/lib/common.h>
00016 #include <shogun/kernel/DotKernel.h>
00017 #include <shogun/features/DenseFeatures.h>
00018 #include <shogun/kernel/LinearARDKernel.h>
00019 
00020 namespace shogun
00021 {
00022 
00024 class CGaussianARDKernel: public CLinearARDKernel
00025 {
00026 public:
00028     CGaussianARDKernel();
00029 
00035     CGaussianARDKernel(int32_t size, float64_t width);
00036 
00044     CGaussianARDKernel(CDenseFeatures<float64_t>* l, CDenseFeatures<float64_t>* r,
00045         int32_t size=10, float64_t width=2.0);
00046 
00048     virtual ~CGaussianARDKernel();
00049 
00054     static CGaussianARDKernel* obtain_from_generic(CKernel* kernel);
00055 
00062     virtual bool init(CFeatures* l, CFeatures* r);
00063 
00068     virtual EKernelType get_kernel_type() { return K_GAUSSIANARD; }
00069 
00074     virtual const char* get_name() const { return "GaussianARDKernel"; }
00075 
00083     virtual SGMatrix<float64_t> get_parameter_gradient(const TParameter* param,
00084             index_t index=-1);
00085 
00086 protected:
00095     virtual float64_t compute(int32_t idx_a, int32_t idx_b);
00096 
00097 private:
00098     void init();
00099 
00100 protected:
00102     float64_t m_width;
00103 };
00104 }
00105 #endif /* GAUSSIANARDKERNEL_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation