queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
InfoTheory.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2017 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_INFO_THEORY_H
26 #define UQ_INFO_THEORY_H
27 
28 #include <queso/Defines.h>
29 #ifdef QUESO_HAS_ANN
30 
31 #include <ANN/ANN.h>
32 #include <ANN/ANNx.h>
33 
34 // TODO: create InfoTheoryOptions
35 #define UQ_INFTH_ANN_NO_SMP 10000
36 #define UQ_INFTH_ANN_EPS 0.0
37 #define UQ_INFTH_ANN_KNN 6
38 
39 namespace QUESO {
40 
46 void distANN_XY( const ANNpointArray dataX, const ANNpointArray dataY,
47  double* distsXY,
48  unsigned int dimX, unsigned int dimY,
49  unsigned int xN, unsigned int yN,
50  unsigned int k, double eps );
51 
56 void normalizeANN_XY( ANNpointArray dataXY, unsigned int dimXY,
57  ANNpointArray dataX, unsigned int dimX,
58  ANNpointArray dataY, unsigned int dimY,
59  unsigned int N );
60 
64 void whiteningANN_X_Y( ANNpointArray dataX1, ANNpointArray dataX2,
65  unsigned int dimX, unsigned int N1, unsigned int N2 );
66 
70 double computeMI_ANN( ANNpointArray dataXY,
71  unsigned int dimX, unsigned int dimY,
72  unsigned int k, unsigned int N, double eps );
73 
80 template <template <class P_V, class P_M> class RV, class P_V, class P_M>
81 double estimateMI_ANN( const RV<P_V,P_M>& jointRV,
82  const unsigned int xDimSel[], unsigned int dimX,
83  const unsigned int yDimSel[], unsigned int dimY,
84  unsigned int k, unsigned int N, double eps );
85 
90 template <class P_V, class P_M,
91  template <class P_V, class P_M> class RV_1,
92  template <class P_V, class P_M> class RV_2>
93 double estimateMI_ANN( const RV_1<P_V,P_M>& xRV,
94  const RV_2<P_V,P_M>& yRV,
95  const unsigned int xDimSel[], unsigned int dimX,
96  const unsigned int yDimSel[], unsigned int dimY,
97  unsigned int k, unsigned int N, double eps );
98 
106 template <class P_V, class P_M,
107  template <class P_V, class P_M> class RV_1,
108  template <class P_V, class P_M> class RV_2>
109 double estimateKL_ANN( RV_1<P_V,P_M>& xRV,
110  RV_2<P_V,P_M>& yRV,
111  unsigned int xDimSel[], unsigned int dimX,
112  unsigned int yDimSel[], unsigned int dimY,
113  unsigned int xN, unsigned int yN,
114  unsigned int k, double eps );
115 
122 template <class P_V, class P_M,
123  template <class P_V, class P_M> class RV_1,
124  template <class P_V, class P_M> class RV_2>
125 double estimateCE_ANN( RV_1<P_V,P_M>& xRV,
126  RV_2<P_V,P_M>& yRV,
127  unsigned int xDimSel[], unsigned int dimX,
128  unsigned int yDimSel[], unsigned int dimY,
129  unsigned int xN, unsigned int yN,
130  unsigned int k, double eps );
131 
132 } // End namespace QUESO
133 
134 #endif // QUESO_HAS_ANN
135 
136 #endif // UQ_INFO_THEORY_H
ANNpoint * ANNpointArray
Definition: ANN.h:376
double estimateMI_ANN(const RV< P_V, P_M > &jointRV, const unsigned int xDimSel[], unsigned int dimX, const unsigned int yDimSel[], unsigned int dimY, unsigned int k, unsigned int N, double eps)
double estimateCE_ANN(RV_1< P_V, P_M > &xRV, RV_2< P_V, P_M > &yRV, unsigned int xDimSel[], unsigned int dimX, unsigned int yDimSel[], unsigned int dimY, unsigned int xN, unsigned int yN, unsigned int k, double eps)
void whiteningANN_X_Y(ANNpointArray dataX1, ANNpointArray dataX2, unsigned int dimX, unsigned int N1, unsigned int N2)
void distANN_XY(const ANNpointArray dataX, const ANNpointArray dataY, double *distsXY, unsigned int dimX, unsigned int dimY, unsigned int xN, unsigned int yN, unsigned int k, double eps)
double estimateKL_ANN(RV_1< P_V, P_M > &xRV, RV_2< P_V, P_M > &yRV, unsigned int xDimSel[], unsigned int dimX, unsigned int yDimSel[], unsigned int dimY, unsigned int xN, unsigned int yN, unsigned int k, double eps)
void normalizeANN_XY(ANNpointArray dataXY, unsigned int dimXY, ANNpointArray dataX, unsigned int dimX, ANNpointArray dataY, unsigned int dimY, unsigned int N)
double computeMI_ANN(ANNpointArray dataXY, unsigned int dimX, unsigned int dimY, unsigned int k, unsigned int N, double eps)

Generated on Tue Jun 5 2018 19:48:55 for queso-0.57.1 by  doxygen 1.8.5