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
string
RegulatoryModulesStringKernel.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) 2009 Sebastian J. Schultheiss and Soeren Sonnenburg
8
* Copyright (C) 2009 Max-Planck-Society
9
*/
10
11
#ifndef _REGULATORYMODULESSTRINGKERNEL_H___
12
#define _REGULATORYMODULESSTRINGKERNEL_H___
13
14
#include <
shogun/lib/common.h
>
15
#include <
shogun/kernel/string/StringKernel.h
>
16
#include <
shogun/features/DenseFeatures.h
>
17
18
namespace
shogun
19
{
25
class
CRegulatoryModulesStringKernel
:
public
CStringKernel
<char>
26
{
27
public
:
29
CRegulatoryModulesStringKernel
();
30
39
CRegulatoryModulesStringKernel
(int32_t size,
float64_t
width
, int32_t
degree
, int32_t
shift
, int32_t
window
);
40
53
CRegulatoryModulesStringKernel
(
CStringFeatures<char>
* lstr,
CStringFeatures<char>
* rstr,
54
CDenseFeatures<uint16_t>
* lpos,
CDenseFeatures<uint16_t>
* rpos,
55
float64_t
width, int32_t degree, int32_t shift, int32_t window, int32_t size=10);
56
58
virtual
~CRegulatoryModulesStringKernel
();
59
66
virtual
bool
init
(
CFeatures
* l,
CFeatures
* r);
67
72
virtual
EKernelType
get_kernel_type
() {
return
K_REGULATORYMODULES
; }
73
78
virtual
const
char
*
get_name
()
const
{
return
"RegulatoryModulesStringKernel"
; }
79
85
void
set_motif_positions
(
86
CDenseFeatures<uint16_t>
* positions_lhs,
CDenseFeatures<uint16_t>
* positions_rhs);
87
88
protected
:
97
virtual
float64_t
compute
(int32_t idx_a, int32_t idx_b);
98
106
float64_t
compute_wds
(
char
* avec,
char
* bvec, int32_t len);
107
108
110
void
set_wd_weights
();
111
112
private
:
114
void
init();
115
116
protected
:
118
float64_t
width
;
119
121
int32_t
degree
;
123
int32_t
shift
;
124
126
int32_t
window
;
127
129
CDenseFeatures<uint16_t>
*
motif_positions_lhs
;
130
132
CDenseFeatures<uint16_t>
*
motif_positions_rhs
;
133
135
SGVector<float64_t>
position_weights
;
136
138
SGVector<float64_t>
weights
;
139
};
140
}
141
#endif
/* _REGULATORYMODULESSTRINGKERNEL_H__ */
SHOGUN
Machine Learning Toolbox - Documentation