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
WeightedDegreeRBFKernel.h
Go to the documentation of this file.
1
#ifndef _WEIGHTEDDEGREERBFKERNEL_H___
2
#define _WEIGHTEDDEGREERBFKERNEL_H___
3
4
#include <
shogun/lib/common.h
>
5
#include <
shogun/kernel/DotKernel.h
>
6
#include <
shogun/features/DenseFeatures.h
>
7
8
namespace
shogun
9
{
10
12
class
CWeightedDegreeRBFKernel
:
public
CDotKernel
13
{
14
public
:
18
CWeightedDegreeRBFKernel
();
19
27
CWeightedDegreeRBFKernel
(int32_t size,
float64_t
width
, int32_t
degree
, int32_t
nof_properties
);
28
38
CWeightedDegreeRBFKernel
(
CDenseFeatures<float64_t>
* l,
CDenseFeatures<float64_t>
* r,
39
float64_t
width, int32_t degree, int32_t nof_properties, int32_t size=10);
40
41
virtual
~CWeightedDegreeRBFKernel
();
42
49
virtual
bool
init
(
CFeatures
* l,
CFeatures
* r);
50
55
//virtual EKernelType get_kernel_type() { return K_UNKNOWN; }
56
virtual
EKernelType
get_kernel_type
() {
return
K_WEIGHTEDDEGREERBF
; }
57
62
inline
virtual
const
char
*
get_name
()
const
{
return
"WeightedDegreeRBFKernel"
; }
63
64
69
inline
virtual
EFeatureClass
get_feature_class
() {
return
C_DENSE
; }
70
75
virtual
EFeatureType
get_feature_type
() {
return
F_DREAL
; }
76
77
83
inline
bool
set_degree
(int32_t deg) { degree=deg;
return
true
; }
84
89
inline
int32_t
get_degree
() {
return
degree
; }
90
91
protected
:
100
virtual
float64_t
compute
(int32_t idx_a, int32_t idx_b);
101
106
bool
init_wd_weights
();
107
108
protected
:
110
float64_t
width
;
111
113
int32_t
degree
;
114
116
int32_t
nof_properties
;
117
120
float64_t
*
weights
;
121
122
};
123
}
124
#endif
/* _WEIGHTEDDEGREERBFKERNEL_H__ */
SHOGUN
Machine Learning Toolbox - Documentation