37#ifndef STK_CATEGORICALBRIDGE_H
38#define STK_CATEGORICALBRIDGE_H
42#include "../STK_IMixtureBridge.h"
48template<
int Id,
class Data>
class CategoricalBridge;
61 typedef typename Data_::Type
Type;
84 typedef typename Data_::Type
Type;
110template<
int Id,
class Data>
121 typedef typename Data::Type
Type;
192template<
int Id,
class Data>
194 :
Base( p_dataij, idData, nbCluster)
200template<
int Id,
class Data>
209template<
int Id,
class Data>
212 int lmin = p_dataij_->col(
j).safe().minElt(),
lmax = p_dataij_->col(
j).safe().maxElt();
214 for (
int i= p_dataij_->beginRows();
i < p_dataij_->endRows(); ++
i)
In this file we implement the Categorical_pjk mixture model.
In this file we define the Categorical_pk model.
template implementation of the IMixtureBridge interface allowing to bridge a STK++ mixture with the c...
virtual CategoricalBridge * create() const
This is a standard create function in usual sense.
hidden::MixtureBridgeTraits< CategoricalBridge< Id, Data > >::MissingIndexes MissingIndexes
hidden::MixtureBridgeTraits< CategoricalBridge< Id, Data > >::Parameters Parameters
MissingIndexes::const_iterator ConstIterator
IMixtureBridge< CategoricalBridge< Id, Data > > Base
CategoricalBridge(Data *p_dataij, String const &idData, int nbCluster)
default constructor.
virtual ~CategoricalBridge()
destructor
CategoricalBridge(Mixture const &mixture, String const &idData, int nbCluster)
protected constructor to use in order to create a bridge.
hidden::MixtureBridgeTraits< CategoricalBridge< Id, Data > >::Mixture Mixture
virtual CategoricalBridge * clone() const
This is a standard clone function in usual sense.
Type safeValue(int j) const
Compute a safe value for the jth variable by counting the most present modality.
Interface base class for the bridges of the STK++ mixture.
MissingIndexes v_missing_
vector with the coordinates of the missing values
Data * p_dataij_
pointer on the data set
hidden::MixtureBridgeTraits< CategoricalBridge< Id, Data > >::Data Data
virtual void removeMissing()
This function will be used once for imputation of missing data at the initialization step (.
Mixture const & mixture() const
Mixture mixture_
The Mixture to bridge with the composer.
Data *const p_dataij() const
CArrayXX const * p_tik() const
This function can be used in derived classes to get posterior probabilities from the framework.
String const & idData() const
int nbCluster() const
This function can be used in derived classes to get number of classes.
virtual void setData(YArray_ const &y, XArray_ const &x)
set the data set.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
std::basic_string< Char > String
STK fundamental type of a String.
hidden::SliceVisitorSelector< Derived, hidden::CountVisitor, Arrays::by_col_ >::type_result count(Derived const &A)
If A is a row-vector or a column-vector then the function will return the usual count value of the ve...
The namespace STK is the main domain space of the Statistical ToolKit project.
TRange< UnknownSize > Range
Arithmetic properties of STK fundamental types.
std::vector< std::pair< int, int > > MissingIndexes
Type of the array storing missing values indexes.
Data_ Data
Structure storing the Data.
Data_::Type Type
Data Type.
ModelParameters< Clust::Categorical_pjk_ > Parameters
Type of the structure storing the mixture parameters.
Categorical_pjk< Data > Mixture
Type of the Mixture model.
std::vector< std::pair< std::pair< int, int >, Type > > MissingValues
Type of the array storing missing values.
Categorical_pk< Data > Mixture
Type of the mixture model.
std::vector< std::pair< int, int > > MissingIndexes
Type of the array storing missing values indexes.
std::vector< std::pair< std::pair< int, int >, Type > > MissingValues
Type of the array storing missing values.
Data_::Type Type
Data Type.
ModelParameters< Clust::Categorical_pk_ > Parameters
Type of the structure storing the mixture parameters.
Data_ Data
Structure storing the Data.
MixtureBridgeTraits struct for bridged mixtures The traits struct MixtureBridgeTraits must be special...