KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
semantics::Context_cell_base Class Reference

#include <Cell_base_classes.h>

Inheritance diagram for semantics::Context_cell_base:
semantics::Cell semantics::Context_cell< T, N >

Public Types

typedef boost::shared_ptr
< Context_cell_base
Self_ptr
 
- Public Types inherited from semantics::Cell
typedef boost::shared_ptr< CellSelf_ptr
 
typedef std::vector< size_t > Step_sizes
 

Public Member Functions

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 const
Categorical_event_base
key () const =0
 return variable values 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 const double & a ()
 
static const double & b ()
 

Protected Member Functions

 Context_cell_base ()
 constructor More...
 
- Protected Member Functions inherited from semantics::Cell
 Cell ()
 default ctor More...
 
virtual ~Cell ()
 virtual destructor More...
 

Additional Inherited Members

- Static Public Attributes inherited from semantics::Cell
static bool VERBOSE = false
 
- Protected Attributes inherited from semantics::Cell
size_t count_
 
size_t table_count_
 

Member Typedef Documentation

Constructor & Destructor Documentation

semantics::Context_cell_base::Context_cell_base ( )
inlineprotected

constructor

Member Function Documentation

const double & semantics::Context_cell_base::a ( )
static
double semantics::Context_cell_base::alpha ( ) const
inline

get the Dirichlet Process concentration parameter for this context

const double & semantics::Context_cell_base::b ( )
static
virtual void semantics::Context_cell_base::decrement_diversity ( )
inlinevirtual

decrement the number of distinct outcomes from this context

int semantics::Context_cell_base::diversity ( ) const
inline

get number of distinct outcomes in this context

double semantics::Context_cell_base::effective_observations ( ) const
inline

total mass for distribution over dish for a new customer

corresponds to alpha + n(H)

double semantics::Context_cell_base::effective_tables ( ) const
inline

total mass for distribution over the "dish" for a new table

corresponds to alpha + m(H)

virtual void semantics::Context_cell_base::increment_diversity ( )
inlinevirtual

increment the number of distinct outcomes from this context

double semantics::Context_cell_base::observation_backoff_weight ( ) const
inline

probability that a new customer will sit at a new table

corresponds to mixture weight (alpha / (n + alpha))

void semantics::Context_cell_base::resample_alpha ( )

resample alpha value from conditional posterior

double semantics::Context_cell_base::table_backoff_weight ( ) const
inline

probability that a new table will draw from the level above this

corresponds to mixture weight (alpha / (m + alpha))


The documentation for this class was generated from the following files: