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
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
inline
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
/* register the parameters
88
*/
89
virtual
void
register_params
();
90
91
protected
:
100
virtual
float64_t
compute
(int32_t idx_a, int32_t idx_b);
101
109
float64_t
compute_wds
(
char
* avec,
char
* bvec, int32_t len);
110
111
113
void
set_wd_weights
();
114
115
protected
:
117
float64_t
width
;
118
120
int32_t
degree
;
122
int32_t
shift
;
123
125
int32_t
window
;
126
128
CDenseFeatures<uint16_t>
*
motif_positions_lhs
;
129
131
CDenseFeatures<uint16_t>
*
motif_positions_rhs
;
132
134
int32_t
alen
;
136
int32_t
blen
;
137
139
float64_t
*
position_weights
;
140
142
float64_t
*
weights
;
143
};
144
}
145
#endif
/* _REGULATORYMODULESSTRINGKERNEL_H__ */
SHOGUN
Machine Learning Toolbox - Documentation