mixmod  3.2.0
Mixture models for clustering and classification
 All Classes Namespaces Files Functions Variables Enumerations Friends
GaussianGeneralParameter.h
1 /***************************************************************************
2  SRC/mixmod/Kernel/Parameter/GaussianGeneralParameter.h description
3  copyright : (C) MIXMOD Team - 2001-2016
4  email : contact@mixmod.org
5  ***************************************************************************/
6 
7 /***************************************************************************
8  This file is part of MIXMOD
9 
10  MIXMOD is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  MIXMOD is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with MIXMOD. If not, see <http://www.gnu.org/licenses/>.
22 
23  All informations available on : http://www.mixmod.org
24 ***************************************************************************/
25 #ifndef XEMGaussianGeneralParameter_H
26 #define XEMGaussianGeneralParameter_H
27 
28 #include "mixmod/Kernel/Parameter/GaussianEDDAParameter.h"
29 
30 namespace XEM {
31 
32 // pre-declaration
33 class DiagMatrix;
34 class GeneralMatrix;
35 
42 
43 public:
44 
47 
49  // called by XEMModel
50  GaussianGeneralParameter(Model * iModel, ModelType * iModelType);
51 
52  // Constructor
53  // called by XEMStrategyType if initialization is USER
55  int64_t iNbCluster,
56  int64_t iPbDimension,
57  ModelType * iModelType,
58  std::string & iFileName);
60  int64_t iNbCluster,
61  int64_t iPbDimension,
62  ModelType * iModelType,
63  double * proportions,
64  double ** means,
65  double *** variances);
66 
69 
71  virtual ~GaussianGeneralParameter();
72 
74  virtual void reset();
75 
79  Parameter * clone() const;
80 
81  void initUSER(Parameter * iParam);
82 
84  // NB : compute also lambda, shape, orientation, wk, w
85  void computeTabSigma();
86 
89  double flury(double F);
90 
91 
92  // SELECTORS
93  // ------ / -------- //
94  double * getTabLambda() const;
95 
99  DiagMatrix ** getTabShape() const;
100 
104  GeneralMatrix ** getTabOrientation() const;
105 
106  double getLogLikelihoodOne() const;
107 
108 protected:
109 
111  double * _tabLambda; /* Volume */
112 
114  DiagMatrix ** _tabShape; /* Shape */
115 
116  // Table of orientation matrix of each cluster
117  GeneralMatrix ** _tabOrientation; /* Orientation */
118 
119  int64_t __storeDim;
120 
121  // model dependant methods for computing _tabSigma
122  void computeTabSigma_L_C();
123  void computeTabSigma_Lk_Ck();
124  void computeTabSigma_L_Ck();
125  void computeTabSigma_L_Dk_A_Dk();
126  void computeTabSigma_Lk_Dk_A_Dk();
127  void computeTabSigma_Lk_C();
128  void computeTabSigma_L_D_Ak_D();
129  void computeTabSigma_Lk_D_Ak_D();
130 
131  //void recopySymmetricMatrixInMatrix(SymmetricMatrix & sym, Matrix& mat, double facteur);
132  int64_t getFreeParameter() const;
133 };
134 
136  return _tabShape;
137 }
138 
140  return _tabOrientation;
141 }
142 
143 inline double * GaussianGeneralParameter::getTabLambda() const {
144  return _tabLambda;
145 }
146 
147 }
148 
149 #endif
class XEMDiagMatrix
Definition: DiagMatrix.h:40
double flury(double F)
Definition: GaussianGeneralParameter.cpp:704
Base class for ModelType(s)
Definition: ModelType.h:37
class GeneralMatrix
Definition: GeneralMatrix.h:40
GeneralMatrix ** getTabOrientation() const
Selector.
Definition: GaussianGeneralParameter.h:139
void computeTabSigma()
Compute table of sigmas of the samples of each cluster.
Definition: GaussianGeneralParameter.cpp:657
DiagMatrix ** getTabShape() const
Selector.
Definition: GaussianGeneralParameter.h:135
virtual void reset()
reset to default values
Definition: GaussianGeneralParameter.cpp:228
Parameter * clone() const
Selector.
Definition: GaussianGeneralParameter.cpp:241
double getLogLikelihoodOne() const
get loglikelihood with one cluster
Definition: GaussianGeneralParameter.cpp:846
Definition: Model.h:50
Derived class of XEMGaussianParameter for EDDA Gaussian Model(s)
Definition: GaussianEDDAParameter.h:39
void initUSER(Parameter *iParam)
User initialisation of the parameters of the model.
Definition: GaussianGeneralParameter.cpp:249
Derived class of XEMGaussianParameter for Spherical Gaussian Model(s)
Definition: GaussianGeneralParameter.h:41
virtual ~GaussianGeneralParameter()
Destructor.
Definition: GaussianGeneralParameter.cpp:183
Base class for XEMParameter(s)
Definition: Parameter.h:45
int64_t getFreeParameter() const
Selector.
Definition: GaussianGeneralParameter.cpp:926
GaussianGeneralParameter()
Default constructor.
Definition: GaussianGeneralParameter.cpp:40