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
structure
StateModel.cpp
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
#include <
shogun/structure/StateModel.h
>
12
13
using namespace
shogun;
14
15
CStateModel::CStateModel
() :
CSGObject
()
16
{
17
init();
18
}
19
20
CStateModel::~CStateModel
()
21
{
22
}
23
24
int32_t
CStateModel::get_num_states
()
const
25
{
26
return
m_num_states
;
27
}
28
29
int32_t
CStateModel::get_num_transmission_params
()
const
30
{
31
return
m_num_transmission_params
;
32
}
33
34
void
CStateModel::init()
35
{
36
SG_ADD
(&
m_num_states
,
"m_num_states"
,
"The number of states"
,
MS_NOT_AVAILABLE
);
37
SG_ADD
(&
m_num_transmission_params
,
"m_num_tranmission_params"
,
38
"The number of tranmission parameters"
,
MS_NOT_AVAILABLE
);
39
SG_ADD
(&
m_state_loss_mat
,
"m_state_loss_mat"
,
"The state loss matrix"
,
40
MS_NOT_AVAILABLE
);
41
SG_ADD
(&
m_p
,
"m_p"
,
"The distribution of start states"
,
MS_NOT_AVAILABLE
);
42
SG_ADD
(&
m_q
,
"m_q"
,
"The distribution of stop states"
,
MS_NOT_AVAILABLE
);
43
44
m_num_states
= 0;
45
m_num_transmission_params
= 0;
46
}
47
48
SGVector< int32_t >
CStateModel::get_monotonicity
(int32_t num_free_states,
49
int32_t num_feats)
const
50
{
51
SGVector< int32_t >
ret(num_feats*num_free_states);
52
ret.
zero
();
53
return
ret;
54
}
55
56
SGVector< float64_t >
CStateModel::get_start_states
()
const
57
{
58
return
m_p
;
59
}
60
61
SGVector< float64_t >
CStateModel::get_stop_states
()
const
62
{
63
return
m_q
;
64
}
SHOGUN
Machine Learning Toolbox - Documentation