KJB
|
#include <Cell_traits.h>
Public Types | |
typedef Prior_cell< T > | Self |
typedef boost::shared_ptr < Prior_cell< T > > | Self_ptr |
typedef Marginal_cell_base::Self_ptr | Base_ptr |
typedef Context_cell_base::Self_ptr | Context_base_ptr |
typedef Categorical_event< 0 > | Key_type |
typedef boost::unordered_map < Key_type, Self_ptr > | Map |
Public Types inherited from semantics::Marginal_cell_base | |
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 | |
Prior_cell (const Key_type &key) | |
const Key_type & | key () const |
return variable values in this cell More... | |
void | increment (const size_t &) |
increment the count associated with a particular table More... | |
void | decrement (const size_t &) |
increment the count associated with a particular table More... | |
size_t | sample_table_assignment () |
sample from the conditional predictive distribution of table assignment More... | |
Base_ptr | margin () const |
get smoothed marginal cell ptr More... | |
Context_base_ptr | context () const |
get ptr to conditioning context cell More... | |
double | backoff_probability () const |
prob of this outcome conditioned on starting a new table More... | |
double | smoothed_probability () |
get smoothed probability estimate More... | |
double | predictive_probability () const |
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 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 Self_ptr | add_event (const Key_type &key, Cell::Step_sizes::const_reverse_iterator, const size_t &, const size_t &) |
Static Public Attributes | |
static Map | map |
Static Public Attributes inherited from semantics::Cell | |
static bool | VERBOSE = false |
Additional Inherited Members | |
Protected Member Functions inherited from semantics::Marginal_cell_base | |
Marginal_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::Marginal_cell_base | |
Table_count_map | per_table_counts_ |
Protected Attributes inherited from semantics::Cell | |
size_t | count_ |
size_t | table_count_ |
typedef Marginal_cell_base::Self_ptr semantics::Prior_cell< T >::Base_ptr |
typedef Context_cell_base::Self_ptr semantics::Prior_cell< T >::Context_base_ptr |
typedef Categorical_event<0> semantics::Prior_cell< T >::Key_type |
typedef boost::unordered_map<Key_type, Self_ptr> semantics::Prior_cell< T >::Map |
typedef Prior_cell<T> semantics::Prior_cell< T >::Self |
typedef boost::shared_ptr<Prior_cell<T> > semantics::Prior_cell< T >::Self_ptr |
|
inline |
|
inlinestatic |
|
inlinevirtual |
prob of this outcome conditioned on starting a new table
corresponds to q(x,H) in the writeup
Implements semantics::Marginal_cell_base.
|
inlinevirtual |
get ptr to conditioning context cell
Implements semantics::Marginal_cell_base.
|
inlinevirtual |
increment the count associated with a particular table
Implements semantics::Marginal_cell_base.
|
inlinevirtual |
increment the count associated with a particular table
Implements semantics::Marginal_cell_base.
|
inlinevirtual |
return variable values in this cell
Implements semantics::Cell.
|
inlinevirtual |
get smoothed marginal cell ptr
Implements semantics::Marginal_cell_base.
|
inlinevirtual |
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
Implements semantics::Marginal_cell_base.
|
inlinevirtual |
sample from the conditional predictive distribution of table assignment
Implements semantics::Marginal_cell_base.
|
inlinevirtual |
get smoothed probability estimate
Implements semantics::Marginal_cell_base.
|
static |