STK++ 0.9.13
STK_IMixture.cpp
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2016 Serge Iovleff
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::Clustering
27 * created on: 14 nov. 2013
28 * Author: iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
29 * Originally created by Parmeet Bhatia <b..._DOT_p..._AT_gmail_Dot_com>
30 **/
31
32
40
41namespace STK
42{
43
44/* constructor */
46 : p_composer_(0), idData_(idData)
47{}
48
49/* copy constructor */
51 : p_composer_(0)
52 , idData_(mixture.idData_)
53{}
54/* Virtual destructor. */
56
57/* set the mixture composer to the mixture */
59
60/* This function can be used in derived classes to get number of samples.
61 * @return Number of samples.
62 * @note STK_IMixtureStatModel.h is include only here
63 */
64int IMixture::nbSample() const { return p_composer_->nbSample();}
65/* This function can be used in derived classes to get number of classes.
66 * @return Number of classes.
67 */
68int IMixture::nbCluster() const { return p_composer_->nbCluster();}
69
70/* This function can be used in derived classes to get proportions from the framework.
71 * @return Pointer to proportions.
72 */
73CPointX const* IMixture::p_pk() const { return &(p_composer_->pk());}
74/* This function can be used in derived classes to get proportions from the framework.
75 * @return Pointer to proportions.
76 */
77CPointX const* IMixture::p_tk() const { return &(p_composer_->tk());}
78/* This function can be used in derived classes to get proportions from the framework.
79 * @return Pointer to proportions.
80 */
81CArrayXX const* IMixture::p_tik() const { return &(p_composer_->tik());}
82/* This function can be used in derived classes to get proportions from the framework.
83 * @return Pointer to proportions.
84 */
85CVectorXi const* IMixture::p_zi() const { return &(p_composer_->zi());}
86
87} // namespace STK
88
In this file we define the abstract base class for mixture statistical models.
define the main interface for linking specific mixture model to the composer.
Interface base class for Mixture (composed) model.
Interface base class for all the mixture models that will be processed by the composer.
CPointX const * p_pk() const
This function can be used in derived classes to get estimated number of individuals from the framewor...
const IMixtureStatModel * p_composer_
pointer on the main composer model
CPointX const * p_tk() const
This function can be used in derived classes to get proportions from the framework.
CVectorXi const * p_zi() const
This function can be used in derived classes to get class labels from the framework.
IMixture(String const &idData=String())
Constructor with identification character.
virtual ~IMixture()
Virtual destructor.
IMixtureStatModel const *const p_composer() const
void setMixtureModel(IMixtureStatModel const *p_composer)
set the mixture composer to the mixture
CArrayXX const * p_tik() const
This function can be used in derived classes to get posterior probabilities from the framework.
int nbCluster() const
This function can be used in derived classes to get number of classes.
int nbSample() const
This function can be used in derived classes to get number of samples.
std::basic_string< Char > String
STK fundamental type of a String.
The namespace STK is the main domain space of the Statistical ToolKit project.