SHOGUN
v2.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
kernel
GaussianARDKernel.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
* (W) 2012 Jacob Walker
8
*
9
* Adapted from WeightedDegreeRBFKernel.h
10
*
11
*/
12
13
#ifndef GAUSSIANARDKERNEL_H_
14
#define GAUSSIANARDKERNEL_H_
15
16
#include <
shogun/lib/common.h
>
17
#include <
shogun/kernel/DotKernel.h
>
18
#include <
shogun/features/DenseFeatures.h
>
19
#include <
shogun/kernel/LinearARDKernel.h
>
20
21
namespace
shogun
22
{
23
27
class
CGaussianARDKernel
:
public
CLinearARDKernel
28
{
29
30
public
:
34
CGaussianARDKernel
();
35
42
CGaussianARDKernel
(int32_t size,
float64_t
width);
43
51
CGaussianARDKernel
(
CDenseFeatures<float64_t>
* l,
CDenseFeatures<float64_t>
* r,
52
int32_t size=10,
float64_t
width = 2.0);
53
55
virtual
~CGaussianARDKernel
();
56
63
virtual
bool
init
(
CFeatures
* l,
CFeatures
* r);
64
69
virtual
EKernelType
get_kernel_type
() {
return
K_GAUSSIANARD
; }
70
75
virtual
const
char
*
get_name
()
const
{
return
"GaussianARDKernel"
; }
76
85
virtual
SGMatrix<float64_t>
get_parameter_gradient
(
TParameter
* param,
86
CSGObject
* obj,
index_t
index = -1);
87
88
protected
:
89
98
virtual
float64_t
compute
(int32_t idx_a, int32_t idx_b);
99
100
private
:
101
102
void
init();
103
104
protected
:
105
107
float64_t
m_width
;
108
};
109
110
}
/* namespace shogun */
111
#endif
/* GAUSSIANARDKERNEL_H_ */
SHOGUN
Machine Learning Toolbox - Documentation