Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
itpp
stat
mog_diag_em.h
Go to the documentation of this file.
1
29
#ifndef MOG_DIAG_EM_H
30
#define MOG_DIAG_EM_H
31
32
#include <
itpp/stat/mog_diag.h
>
33
34
35
namespace
itpp
36
{
37
42
class
MOG_diag_EM_sup
:
public
MOG_diag
43
{
44
45
public
:
46
48
MOG_diag_EM_sup
() {
verbose
=
false
; }
49
51
~MOG_diag_EM_sup
() { }
52
54
void
ml
(
MOG_diag
&model_in,
Array<vec>
&X_in,
int
max_iter_in = 10,
double
var_floor_in = 0.0,
double
weight_floor_in = 0.0,
bool
verbose_in =
false
);
56
void
map
(
MOG_diag
&model_in,
MOG_diag
&prior_model,
Array<vec>
&X_in,
int
max_iter_in = 10,
double
alpha_in = 0.5,
double
var_floor_in = 0.0,
double
weight_floor_in = 0.0,
bool
verbose_in =
false
);
57
58
protected
:
59
61
bool
verbose
;
62
64
int
N
;
65
67
int
max_iter
;
68
70
double
**
c_X
;
71
73
double
var_floor
;
75
double
weight_floor
;
76
78
void
inline
update_internals
();
80
void
inline
sanitise_params
();
82
double
ml_update_params
();
84
void
ml_iterate
();
85
86
private
:
87
88
vec tmpvecK;
89
vec tmpvecD;
90
vec acc_loglhood_K;
91
92
Array<vec>
acc_means;
93
Array<vec>
acc_covs;
94
95
double
* c_tmpvecK;
96
double
* c_tmpvecD;
97
double
* c_acc_loglhood_K;
98
99
double
** c_acc_means;
100
double
** c_acc_covs;
101
102
103
};
104
105
//
106
// convenience functions
107
135
void
MOG_diag_ML
(
MOG_diag
&model_in,
Array<vec>
&X_in,
int
max_iter_in = 10,
double
var_floor_in = 0.0,
double
weight_floor_in = 0.0,
bool
verbose_in =
false
);
136
155
void
MOG_diag_MAP
(
MOG_diag
&model_in,
MOG_diag
&prior_model_in,
Array<vec>
&X_in,
int
max_iter_in = 10,
double
alpha_in = 0.5,
double
var_floor_in = 0.0,
double
weight_floor_in = 0.0,
bool
verbose_in =
false
);
156
157
}
158
159
#endif // #ifndef MOG_DIAG_EM_H
160
Generated on Fri Mar 21 2014 17:14:14 for IT++ by
Doxygen
1.8.1.2