Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
#include <itpp/itexports.h>
34
#include <
itpp/base/base_exports.h
>
35
36
namespace
itpp
37
{
38
43
class
ITPP_EXPORT
MOG_diag_EM_sup
:
public
MOG_diag
44
{
45
46
public
:
47
49
MOG_diag_EM_sup
() { verbose =
false
; }
50
52
~MOG_diag_EM_sup
() { }
53
55
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
);
57
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
);
58
59
protected
:
60
62
bool
verbose
;
63
65
int
N
;
66
68
int
max_iter
;
69
71
double
**
c_X
;
72
74
double
var_floor
;
76
double
weight_floor
;
77
79
void
inline
update_internals();
81
void
inline
sanitise_params();
83
double
ml_update_params();
85
void
ml_iterate();
86
87
private
:
88
89
vec tmpvecK;
90
vec tmpvecD;
91
vec acc_loglhood_K;
92
93
Array<vec>
acc_means;
94
Array<vec>
acc_covs;
95
96
double
* c_tmpvecK;
97
double
* c_tmpvecD;
98
double
* c_acc_loglhood_K;
99
100
double
** c_acc_means;
101
double
** c_acc_covs;
102
103
104
};
105
106
//
107
// convenience functions
108
136
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
);
137
156
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
);
157
158
}
159
160
#endif // #ifndef MOG_DIAG_EM_H
161
Generated on Sat Jul 6 2013 10:54:25 for IT++ by
Doxygen
1.8.2