KJB
|
#include <Cell_base_classes.h>
Public Types | |
typedef boost::shared_ptr < Marginal_cell_base > | Self_ptr |
typedef boost::shared_ptr < Context_cell_base > | Context_ptr |
typedef std::map< size_t, size_t > | Table_count_map |
Public Types inherited from semantics::Cell | |
typedef boost::shared_ptr< Cell > | Self_ptr |
typedef std::vector< size_t > | Step_sizes |
Public Member Functions | |
virtual Self_ptr | margin () const =0 |
get smoothed marginal cell ptr More... | |
virtual Context_ptr | context () const =0 |
get ptr to conditioning context cell More... | |
virtual void | increment (const size_t &table_code)=0 |
increment the count associated with a particular table More... | |
virtual void | decrement (const size_t &table_code)=0 |
increment the count associated with a particular table More... | |
virtual size_t | sample_table_assignment ()=0 |
sample from the conditional predictive distribution of table assignment More... | |
virtual double | smoothed_probability ()=0 |
get smoothed probability estimate More... | |
virtual double | backoff_probability () const =0 |
prob of this outcome conditioned on starting a new table More... | |
virtual double | predictive_probability () const =0 |
predictive probability of this outcome in this context 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... | |
Protected Member Functions | |
Marginal_cell_base () | |
constructor More... | |
Protected Member Functions inherited from semantics::Cell | |
Cell () | |
default ctor More... | |
virtual | ~Cell () |
virtual destructor More... | |
Protected Attributes | |
Table_count_map | per_table_counts_ |
Protected Attributes inherited from semantics::Cell | |
size_t | count_ |
size_t | table_count_ |
Additional Inherited Members | |
Static Public Attributes inherited from semantics::Cell | |
static bool | VERBOSE = false |
typedef boost::shared_ptr<Context_cell_base> semantics::Marginal_cell_base::Context_ptr |
typedef boost::shared_ptr<Marginal_cell_base> semantics::Marginal_cell_base::Self_ptr |
typedef std::map<size_t, size_t> semantics::Marginal_cell_base::Table_count_map |
|
inlineprotected |
constructor
|
pure virtual |
prob of this outcome conditioned on starting a new table
corresponds to q(x,H) in the writeup
Implemented in semantics::Marginal_cell< T, N >, and semantics::Prior_cell< T >.
|
pure virtual |
get ptr to conditioning context cell
Implemented in semantics::Marginal_cell< T, N >, and semantics::Prior_cell< T >.
|
pure virtual |
increment the count associated with a particular table
Implemented in semantics::Marginal_cell< T, N >, and semantics::Prior_cell< T >.
|
pure virtual |
increment the count associated with a particular table
Implemented in semantics::Marginal_cell< T, N >, and semantics::Prior_cell< T >.
|
pure virtual |
get smoothed marginal cell ptr
Implemented in semantics::Marginal_cell< T, N >, and semantics::Prior_cell< T >.
|
pure virtual |
predictive probability of this outcome in this context
corresponds to p(x|beta(H)) in the writeup, but is not normalized. normalization must occur later when comparing
Implemented in semantics::Marginal_cell< T, N >, and semantics::Prior_cell< T >.
|
pure virtual |
sample from the conditional predictive distribution of table assignment
Implemented in semantics::Marginal_cell< T, N >, and semantics::Prior_cell< T >.
|
pure virtual |
get smoothed probability estimate
Implemented in semantics::Marginal_cell< T, N >, and semantics::Prior_cell< T >.
|
protected |