Edinburgh Speech Tools  2.1-release
EST_dynamic_model.h
Go to the documentation of this file.
1 /*************************************************************************/
2 /* */
3 /* Centre for Speech Technology Research */
4 /* University of Edinburgh, UK */
5 /* Copyright (c) 1995,1996 */
6 /* All Rights Reserved. */
7 /* */
8 /* Permission is hereby granted, free of charge, to use and distribute */
9 /* this software and its documentation without restriction, including */
10 /* without limitation the rights to use, copy, modify, merge, publish, */
11 /* distribute, sublicense, and/or sell copies of this work, and to */
12 /* permit persons to whom this work is furnished to do so, subject to */
13 /* the following conditions: */
14 /* 1. The code must retain the above copyright notice, this list of */
15 /* conditions and the following disclaimer. */
16 /* 2. Any modifications must be clearly marked as such. */
17 /* 3. Original authors' names are not deleted. */
18 /* 4. The authors' names are not used to endorse or promote products */
19 /* derived from this software without specific prior written */
20 /* permission. */
21 /* */
22 /* THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK */
23 /* DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING */
24 /* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT */
25 /* SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE */
26 /* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES */
27 /* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN */
28 /* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
29 /* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF */
30 /* THIS SOFTWARE. */
31 /* */
32 /*************************************************************************/
33 /* Author : Simon King */
34 /* Date : June 1998 */
35 /*-----------------------------------------------------------------------*/
36 /* Dynamical models for ASR */
37 /* */
38 /*=======================================================================*/
39 
40 #include <cstdlib>
41 #include <cstdio>
42 #include <fstream>
43 #include "EST.h"
44 #include "EST_model_types.h"
45 
46 // for now, CSMM means continuous-state Markov model
47 class CSMM
48 {
49 public:
58 };
59 
60 bool operator ==(const CSMM &, const CSMM &);
61 ostream& operator <<(ostream &s, const CSMM &);
62 
63 /// somewhere to keep the model parameters
65 {
68 };
69 
70 /// somewhere to keep the models
71 struct CSMM_set
72 {
75 };
76 
77 
78 
79 ostream& operator <<(ostream &s, const CSMM_set &ms);
80 
81 bool
82 create_empty_CSMM(EST_String model_name,
83  CSMM_set &model_set,
84  const int model_order,
85  const int observation_order);
86 
87 /// at last, some interesting functions
88 bool
89 E_step(CSMM &model,
90  EST_DMatrix &mean_initial_covar_x,
91  const EST_TrackList &train_data,
92  const bool trace);
93 bool
94 M_step(CSMM &model,
95  const bool trace);
96 bool
98  const int model_order,
99  EST_DMatrix &mean_initial_covar_x,
100  const EST_TrackList &train_data,
101  const int iterations,
102  const bool trace);
104 save_CSMM_set(CSMM_set &model_set, const EST_String &dirname, const EST_String &type);
105 
107 load_CSMM_set(CSMM_set &model_set, const EST_String &dirname);
108 
109 double
110 CSMM_Mahalanobis_distance(const CSMM &model, const EST_Track &t);
EST_read_status load_CSMM_set(CSMM_set &model_set, const EST_String &dirname)
refcounted_EST_DMatrixP Q_v
refcounted_EST_DVectorP u_w
EST_write_status save_CSMM_set(CSMM_set &model_set, const EST_String &dirname, const EST_String &type)
an accumulator to be owned by every model
EST_write_status
refcounted_EST_DMatrixP F
bool operator==(const CSMM &, const CSMM &)
bool E_step(CSMM &model, EST_DMatrix &mean_initial_covar_x, const EST_TrackList &train_data, const bool trace)
at last, some interesting functions
refcounted_EST_DMatrixP H
bool EM_shared_hidden_space(CSMM_set &models, const int model_order, EST_DMatrix &mean_initial_covar_x, const EST_TrackList &train_data, const int iterations, const bool trace)
stats_accumulator stats
bool M_step(CSMM &model, const bool trace)
EST_TKVL< EST_String, refcounted_EST_DMatrixP > matrix_set
CSMM_parameter_set parameter_set
refcounted_EST_DMatrixP Q_w
EST_TKVL< EST_String, CSMM > model_set
Templated Key-Value list. Objects of type EST_TKVL contain lists which are accessed by a key of type ...
Definition: EST_TKVL.h:73
somewhere to keep the model parameters
somewhere to keep the models
EST_TKVL< EST_String, refcounted_EST_DVectorP > vector_set
refcounted_EST_DVectorP u_v
EST_read_status
ostream & operator<<(ostream &s, const CSMM &)
bool create_empty_CSMM(EST_String model_name, CSMM_set &model_set, const int model_order, const int observation_order)
refcounted_EST_DVectorP mean_initial_x
double CSMM_Mahalanobis_distance(const CSMM &model, const EST_Track &t)