mixmod  3.2.0
Mixture models for clustering and classification
 All Classes Namespaces Files Functions Variables Enumerations Friends
ExampleDataUtil.h
1 /***************************************************************************
2  SRC/mixmod/Utilities/ExampleDataUtil.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 ***************************************************************************/
31 #ifndef XEM_EXAMPLEDATAUTIL_H
32 #define XEM_EXAMPLEDATAUTIL_H
33 
34 #include "mixmod/Kernel/IO/Data.h"
35 #include "mixmod/Kernel/IO/CompositeData.h"
36 #include "mixmod/Kernel/IO/GaussianData.h"
37 #include "mixmod/Kernel/IO/BinaryData.h"
38 #include "mixmod/Kernel/IO/DataDescription.h"
39 #include "mixmod/Kernel/IO/LabelDescription.h"
40 #include "mixmod/Clustering/ClusteringInput.h"
41 #include "mixmod/DiscriminantAnalysis/Learn/LearnInput.h"
42 #include "mixmod/DiscriminantAnalysis/Predict/PredictInput.h"
43 #include "mixmod/DiscriminantAnalysis/Learn/LearnModelOutput.h"
44 #include "mixmod/Kernel/Model/ModelType.h"
45 
46 namespace XEM {
47 
48 // @param fileName Input file name. It should be CSV file with first row containing type for corresponding column.
49 // Type can be 'C' for continuous (gaussian) or 'B' for binary (categories).
50 ClusteringInput* getClusteringInput(string fileName, const vector<int64_t>& nbCluster);
51 LearnInput* getLearnInput(string fileName);
52 PredictInput* getPredictInput(string fileName, LearnModelOutput* lOutput);
53 
54 template<class T>
55 inline void DeleteData(T ** data, int nbSample){
56  for (int i=0; i<nbSample; i++)
57  delete [] data[i];
58  delete [] data;
59 }
60 
61 }
62 
63 #endif