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
structure
TwoStateModel.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 Fernando José Iglesias García
8
* Copyright (C) 2012 Fernando José Iglesias García
9
*/
10
11
#ifndef __TWO_STATE_MODEL_H__
12
#define __TWO_STATE_MODEL_H__
13
14
#include <
shogun/structure/StateModel.h
>
15
#include <
shogun/structure/HMSVMModel.h
>
16
17
namespace
shogun
18
{
19
24
class
CTwoStateModel
:
public
CStateModel
25
{
26
public
:
28
CTwoStateModel
();
29
31
virtual
~CTwoStateModel
();
32
43
virtual
SGMatrix< float64_t >
loss_matrix
(
CSequence
* label_seq);
44
54
virtual
float64_t
loss
(
CSequence
* label_seq_lhs,
CSequence
* label_seq_rhs);
55
67
virtual
void
reshape_emission_params
(
SGVector< float64_t >
& emission_weights,
68
SGVector< float64_t >
w, int32_t num_feats, int32_t num_obs);
69
78
virtual
void
reshape_transmission_params
(
79
SGMatrix< float64_t >
& transmission_weights,
80
SGVector< float64_t >
w);
81
88
virtual
SGVector< int32_t >
labels_to_states
(
CSequence
* label_seq)
const
;
89
96
virtual
CSequence
*
states_to_labels
(
SGVector< int32_t >
state_seq)
const
;
97
111
virtual
void
weights_to_vector
(
SGVector< float64_t >
& psi,
112
SGMatrix< float64_t >
transmission_weights,
113
SGVector< float64_t >
emission_weights,
114
int32_t num_feats, int32_t num_obs)
const
;
115
128
virtual
SGVector< int32_t >
get_monotonicity
(int32_t num_free_states,
129
int32_t num_feats)
const
;
130
137
static
CHMSVMModel
*
simulate_two_state_data
();
138
140
virtual
const
char
*
get_name
()
const
{
return
"TwoStateModel"
; }
141
};
142
143
}
/* namespace shogun */
144
145
#endif
/* __TWO_STATE_MODEL_H__ */
SHOGUN
Machine Learning Toolbox - Documentation