KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
semantics::Prior_cell< T > Class Template Reference

#include <Cell_traits.h>

Inheritance diagram for semantics::Prior_cell< T >:
semantics::Marginal_cell_base semantics::Cell

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< CellSelf_ptr
 
typedef std::vector< size_t > Step_sizes
 

Public Member Functions

 Prior_cell (const Key_type &key)
 
const Key_typekey () 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_
 

Member Typedef Documentation

template<class T >
typedef Categorical_event<0> semantics::Prior_cell< T >::Key_type
template<class T >
typedef boost::unordered_map<Key_type, Self_ptr> semantics::Prior_cell< T >::Map
template<class T >
typedef Prior_cell<T> semantics::Prior_cell< T >::Self
template<class T >
typedef boost::shared_ptr<Prior_cell<T> > semantics::Prior_cell< T >::Self_ptr

Constructor & Destructor Documentation

template<class T >
semantics::Prior_cell< T >::Prior_cell ( const Key_type key)
inline

Member Function Documentation

template<class T >
static Self_ptr semantics::Prior_cell< T >::add_event ( const Key_type key,
Cell::Step_sizes::const_reverse_iterator  ,
const size_t &  ,
const size_t &   
)
inlinestatic
template<class T >
double semantics::Prior_cell< T >::backoff_probability ( ) const
inlinevirtual

prob of this outcome conditioned on starting a new table

corresponds to q(x,H) in the writeup

Implements semantics::Marginal_cell_base.

template<class T >
Context_base_ptr semantics::Prior_cell< T >::context ( ) const
inlinevirtual

get ptr to conditioning context cell

Implements semantics::Marginal_cell_base.

template<class T >
void semantics::Prior_cell< T >::decrement ( const size_t &  table_code)
inlinevirtual

increment the count associated with a particular table

Implements semantics::Marginal_cell_base.

template<class T >
void semantics::Prior_cell< T >::increment ( const size_t &  table_code)
inlinevirtual

increment the count associated with a particular table

Implements semantics::Marginal_cell_base.

template<class T >
const Key_type& semantics::Prior_cell< T >::key ( ) const
inlinevirtual

return variable values in this cell

Implements semantics::Cell.

template<class T >
Base_ptr semantics::Prior_cell< T >::margin ( ) const
inlinevirtual

get smoothed marginal cell ptr

Implements semantics::Marginal_cell_base.

template<class T >
double semantics::Prior_cell< T >::predictive_probability ( ) const
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.

template<class T >
size_t semantics::Prior_cell< T >::sample_table_assignment ( )
inlinevirtual

sample from the conditional predictive distribution of table assignment

Implements semantics::Marginal_cell_base.

template<class T >
double semantics::Prior_cell< T >::smoothed_probability ( )
inlinevirtual

get smoothed probability estimate

Implements semantics::Marginal_cell_base.

Member Data Documentation

template<class T >
Prior_cell< T >::Map semantics::Prior_cell< T >::map
static

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