SHOGUN
v3.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
* Written (W) 2012 Jacob Walker
8
*
9
* Adapted from WeightedDegreeRBFKernel.h
10
*/
11
12
#ifndef GAUSSIANARDKERNEL_H_
13
#define GAUSSIANARDKERNEL_H_
14
15
#include <
shogun/lib/common.h
>
16
#include <
shogun/kernel/DotKernel.h
>
17
#include <
shogun/features/DenseFeatures.h
>
18
#include <
shogun/kernel/LinearARDKernel.h
>
19
20
namespace
shogun
21
{
22
24
class
CGaussianARDKernel
:
public
CLinearARDKernel
25
{
26
public
:
28
CGaussianARDKernel
();
29
35
CGaussianARDKernel
(int32_t size,
float64_t
width);
36
44
CGaussianARDKernel
(
CDenseFeatures<float64_t>
* l,
CDenseFeatures<float64_t>
* r,
45
int32_t size=10,
float64_t
width=2.0);
46
48
virtual
~CGaussianARDKernel
();
49
54
static
CGaussianARDKernel
*
obtain_from_generic
(
CKernel
*
kernel
);
55
62
virtual
bool
init
(
CFeatures
* l,
CFeatures
* r);
63
68
virtual
EKernelType
get_kernel_type
() {
return
K_GAUSSIANARD
; }
69
74
virtual
const
char
*
get_name
()
const
{
return
"GaussianARDKernel"
; }
75
83
virtual
SGMatrix<float64_t>
get_parameter_gradient
(
const
TParameter
* param,
84
index_t
index=-1);
85
86
protected
:
95
virtual
float64_t
compute
(int32_t idx_a, int32_t idx_b);
96
97
private
:
98
void
init();
99
100
protected
:
102
float64_t
m_width
;
103
};
104
}
105
#endif
/* GAUSSIANARDKERNEL_H_ */
SHOGUN
Machine Learning Toolbox - Documentation