SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ExponentialKernel.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Gaussian Kernel used as template, attribution:
8  * Written (W) 1999-2010 Soeren Sonnenburg
9  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
10  * Copyright (C) 2010 Berlin Institute of Technology
11  *
12  * Slightly edited by Justin Patera 2011
13  */
14 
15 #ifndef _EXPONENTIALKERNEL_H___
16 #define _EXPONENTIALKERNEL_H___
17 
18 #include <shogun/lib/config.h>
19 
20 #include <shogun/lib/common.h>
24 
25 namespace shogun
26 {
27  class CDotFeatures;
40 {
41  public:
46 
56  float64_t width, CDistance* distance, int32_t size);
57 
59  virtual ~CExponentialKernel();
60 
67  virtual bool init(CFeatures* l, CFeatures* r);
68 
70  virtual void cleanup();
71 
77 
82  virtual const char* get_name() const { return "ExponentialKernel"; }
83 
88  virtual float64_t get_width() const
89  {
90  return m_width;
91  }
92 
93  protected:
102  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
103 
112  virtual void load_serializable_post() throw (ShogunException);
113 
114  private:
115  void init();
116 
117  protected:
122 };
123 }
124 #endif /* _EXPONENTIALKERNEL_H__ */
float distance(CJLCoverTreePoint p1, CJLCoverTreePoint p2, float64_t upper_bound)
virtual bool init(CFeatures *l, CFeatures *r)
EKernelType
Definition: Kernel.h:57
Class Distance, a base class for all the distances used in the Shogun toolbox.
Definition: Distance.h:81
Class ShogunException defines an exception which is thrown whenever an error inside of shogun occurs...
The Exponential Kernel, closely related to the Gaussian Kernel computed on CDotFeatures.
Features that support dot products among other operations.
Definition: DotFeatures.h:44
virtual EKernelType get_kernel_type()
Template class DotKernel is the base class for kernels working on DotFeatures.
Definition: DotKernel.h:31
double float64_t
Definition: common.h:50
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
virtual const char * get_name() const
The class Features is the base class of all feature objects.
Definition: Features.h:68
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
virtual float64_t get_width() const

SHOGUN Machine Learning Toolbox - Documentation