STK++ 0.9.13
STK_Model_Util.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2016 Serge Iovleff, Université Lille 1, Inria
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the
16 Free Software Foundation, Inc.,
17 59 Temple Place,
18 Suite 330,
19 Boston, MA 02111-1307
20 USA
21
22 Contact : S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
23*/
24
25/*
26 * Project: stkpp::Model
27 * created on: 22 juil. 2011
28 * Purpose: constants and utilities functions for the project Model.
29 * Author: iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
30 *
31 **/
32
38#ifndef STK_MODEL_UTIL_H
39#define STK_MODEL_UTIL_H
40
41#include <STKernel.h>
42
43namespace STK
44{
45
46namespace hidden
47{
48template<class Data> struct ModelTraits;
49} // hidden
50
51namespace Model
52{
53
87
100
108{
109 if (toUpperString(type) == toUpperString(_T("AIC"))) return aic_;
110 if (toUpperString(type) == toUpperString(_T("BIC"))) return bic_;
111 if (toUpperString(type) == toUpperString(_T("ICL"))) return icl_;
112 if (toUpperString(type) == toUpperString(_T("ML"))) return ml_;
113 return unknownCriterion_;
114}
115
122{
123 switch (type)
124 {
125 case aic_:
126 return String(_T("AIC"));
127 case bic_:
128 return String(_T("BIC"));
129 case icl_:
130 return String(_T("ICL"));
131 case ml_:
132 return String(_T("ML"));
134 return String(_T("unknown"));
135 }
136 return String(_T("unknown"));
137}
138
139} // namespace Model
140
141} // namespace STK
142
143#endif /* STK_MODEL_UTIL_H */
#define _T(x)
Let x unmodified.
This file include all the header files of the project STKernel.
String const & toUpperString(String &s)
convert the characters of the String to upper case
Definition STK_String.h:134
std::basic_string< Char > String
STK fundamental type of a String.
TypeCriterion stringToTypeCriterion(const String &type)
convert a String to a TypeReduction.
String typeCriterionToString(const TypeCriterion &type)
convert a TypeCriterion to a String.
StatisticalModels
list of the statistical models that can be used
TypeCriterion
Model selection criteria.
@ MixtureCategorical_pjk_
@ ModelDiagGaussian_muj_sj_
@ bic_
information criterion
@ aic_
akaike criterion
@ unknownCriterion_
unknown criterion
@ ml_
Maximum Likelihood criterion.
@ icl_
integrated likelihood criterion
@ unknown_criterion_
unknown criterion
The namespace STK is the main domain space of the Statistical ToolKit project.