KJB
|
class containing conditioning context for marginal cells More...
#include <Marginal_cell.h>
Public Types | |
typedef boost::shared_ptr < Context_cell< T, N > > | Self_ptr |
typedef Cell_traits< T, N > | Traits |
typedef Categorical_event< N > | Key_type |
typedef boost::unordered_map < Key_type, Self_ptr > | Map |
Public Types inherited from semantics::Context_cell_base | |
typedef boost::shared_ptr < Context_cell_base > | Self_ptr |
Public Types inherited from semantics::Cell | |
typedef boost::shared_ptr< Cell > | Self_ptr |
typedef std::vector< size_t > | Step_sizes |
Public Member Functions | |
Context_cell (const Key_type &key) | |
Constructs a cell which is purely context information. More... | |
Context_cell (const Context_cell &other) | |
copy ctor More... | |
virtual | ~Context_cell () |
destructor More... | |
const Key_type & | key () const |
return data More... | |
Public Member Functions inherited from semantics::Context_cell_base | |
int | diversity () const |
get number of distinct outcomes in this context More... | |
double | alpha () const |
get the Dirichlet Process concentration parameter for this context More... | |
virtual void | increment_diversity () |
increment the number of distinct outcomes from this context More... | |
virtual void | decrement_diversity () |
decrement the number of distinct outcomes from this context More... | |
void | resample_alpha () |
resample alpha value from conditional posterior More... | |
double | effective_tables () const |
total mass for distribution over the "dish" for a new table More... | |
double | effective_observations () const |
total mass for distribution over dish for a new customer More... | |
double | table_backoff_weight () const |
probability that a new table will draw from the level above this More... | |
double | observation_backoff_weight () const |
probability that a new customer will sit at a new table More... | |
Public Member Functions inherited from semantics::Cell | |
const size_t & | count () const |
get current count in this cell More... | |
const size_t & | table_count () const |
get number of "tables" in this cell More... | |
virtual void | increment () |
increment count More... | |
virtual void | decrement () |
decrement count More... | |
virtual void | increment_table_count () |
increment table count More... | |
virtual void | decrement_table_count () |
decrement table count More... | |
Static Public Member Functions | |
static void | resample_all_alphas () |
resample all CRP alpha values at this level only More... | |
Static Public Member Functions inherited from semantics::Context_cell_base | |
static const double & | a () |
static const double & | b () |
Static Public Attributes | |
static Map | map |
static bool & | VERBOSE = Cell::VERBOSE |
Static Public Attributes inherited from semantics::Cell | |
static bool | VERBOSE = false |
Friends | |
std::ostream & | operator (std::ostream &os, const Map &map) |
output a contingency table in human readable form to an ostream More... | |
Additional Inherited Members | |
Protected Member Functions inherited from semantics::Context_cell_base | |
Context_cell_base () | |
constructor More... | |
Protected Member Functions inherited from semantics::Cell | |
Cell () | |
default ctor More... | |
virtual | ~Cell () |
virtual destructor More... | |
Protected Attributes inherited from semantics::Cell | |
size_t | count_ |
size_t | table_count_ |
class containing conditioning context for marginal cells
typedef Categorical_event<N> semantics::Context_cell< T, N >::Key_type |
typedef boost::unordered_map<Key_type, Self_ptr> semantics::Context_cell< T, N >::Map |
typedef boost::shared_ptr<Context_cell<T, N> > semantics::Context_cell< T, N >::Self_ptr |
typedef Cell_traits<T,N> semantics::Context_cell< T, N >::Traits |
semantics::Context_cell< T, N >::Context_cell | ( | const Key_type & | key | ) |
Constructs a cell which is purely context information.
key | container holding values of each categorical variable |
semantics::Context_cell< T, N >::Context_cell | ( | const Context_cell< T, N > & | other | ) |
copy ctor
|
virtual |
destructor
|
inlinevirtual |
return data
Implements semantics::Cell.
|
static |
resample all CRP alpha values at this level only
|
friend |
output a contingency table in human readable form to an ostream
|
static |
|
static |