Edinburgh Speech Tools  2.1-release
EST_multistats.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 : Paul Taylor */
34 /* Date : July 1995 */
35 /*-----------------------------------------------------------------------*/
36 /* Basic Multivariate Statistical Function Prototypes */
37 /* */
38 /*=======================================================================*/
39 #ifndef __Multistats_H__
40 #define __Multistats_H__
41 
42 #include "EST_FMatrix.h"
43 #include "EST_types.h"
44 
45 float mean(EST_FVector &m);
46 
50 
53 
56 
57 
59 
62 EST_FMatrix population_mean(EST_FMatrix *in, int num_pop);
63 EST_FMatrix add_populations(EST_FMatrix *in, int num_pop);
64 
66 void print_confusion(const EST_FMatrix &a, EST_StrStr_KVL &list,
67  EST_StrList &lex);
68 
69 #define OLS_IGNORE 100
70 int ols(const EST_FMatrix &X,const EST_FMatrix &Y, EST_FMatrix &coeffs);
71 int robust_ols(const EST_FMatrix &X,
72  const EST_FMatrix &Y,
73  EST_FMatrix &coeffs);
74 int robust_ols(const EST_FMatrix &X,
75  const EST_FMatrix &Y,
76  EST_IVector &included,
77  EST_FMatrix &coeffs);
78 int stepwise_ols(const EST_FMatrix &X,
79  const EST_FMatrix &Y,
80  const EST_StrList &feat_names,
81  float limit,
82  EST_FMatrix &coeffs,
83  const EST_FMatrix &Xtest,
84  const EST_FMatrix &Ytest,
85  EST_IVector &included);
86 int ols_apply(const EST_FMatrix &samples,
87  const EST_FMatrix &coeffs,
88  EST_FMatrix &res);
89 int ols_test(const EST_FMatrix &real,
90  const EST_FMatrix &predicted,
91  float &correlation,
92  float &rmse);
93 
94 #endif // __Multistats_H__
int ols_test(const EST_FMatrix &real, const EST_FMatrix &predicted, float &correlation, float &rmse)
Definition: EST_ols.cc:288
EST_FMatrix euclidean_distance(EST_FMatrix &m)
EST_FVector sample_stdev(EST_FMatrix &m)
int robust_ols(const EST_FMatrix &X, const EST_FMatrix &Y, EST_FMatrix &coeffs)
Definition: EST_ols.cc:73
EST_FMatrix mahalanobis_distance(EST_FMatrix &gu, EST_FMatrix &v)
int ols(const EST_FMatrix &X, const EST_FMatrix &Y, EST_FMatrix &coeffs)
Definition: EST_ols.cc:59
EST_FVector sample_variance(EST_FMatrix &m)
A vector class for floating point numbers. EST_FVector x should be used instead of float *x wherever ...
Definition: EST_FMatrix.h:119
EST_FMatrix population_mean(EST_FMatrix *in, int num_pop)
EST_FMatrix add_populations(EST_FMatrix *in, int num_pop)
void print_confusion(const EST_FMatrix &a, EST_StrStr_KVL &list, EST_StrList &lex)
Definition: confusion.cc:77
EST_FMatrix sub(const EST_FMatrix &a, ssize_t row, ssize_t col)
Definition: vec_mat_aux.cc:187
int stepwise_ols(const EST_FMatrix &X, const EST_FMatrix &Y, const EST_StrList &feat_names, float limit, EST_FMatrix &coeffs, const EST_FMatrix &Xtest, const EST_FMatrix &Ytest, EST_IVector &included)
Definition: EST_ols.cc:199
EST_FMatrix confusion(EST_StrStr_KVL &list, EST_StrList &lex)
Definition: confusion.cc:59
EST_FMatrix sample_correlation(EST_FMatrix &m)
int ols_apply(const EST_FMatrix &samples, const EST_FMatrix &coeffs, EST_FMatrix &res)
Definition: EST_ols.cc:185
float mean(EST_FVector &m)
float correlation(EST_Track &a, EST_Track &b, ssize_t channel)
EST_FMatrix penrose_distance(EST_FMatrix &m)
#define X
EST_FMatrix sample_covariance(EST_FMatrix &m)
EST_FMatrix normalise(EST_FMatrix &m, EST_FVector &sub, EST_FVector &div)