|
using | Super = DeterministicLOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar,&grammar > |
|
using | CCH = CachedCallHypothesis< InnerHypothesis, defaultdatum_t< BindingTree *, std::string >, bool > |
|
using | output_t = Super::output_t |
|
using | data_t = Super::data_t |
|
using | Super = DeterministicLOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar,&Combinators::skgrammar > |
|
using | Super = DeterministicLOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar,&grammar > |
|
using | CCH = CachedCallHypothesis< InnerHypothesis, Utterance, TruthValue > |
|
using | Super = LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t > |
|
using | Super = LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t > |
|
using | Super = LOTHypothesis< this_t, _input_t, _output_t, _Grammar_t, grammar, _datum_t, _data_t, _VirtualMachineState_t > |
|
using | Super = LOTHypothesis< InnerHypothesis, Utterance, TruthValue, MyGrammar, grammar, defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > >, typename MyGrammar ::VirtualMachineState_t > |
|
using | input_t = Super::input_t |
|
using | output_t = Super::output_t |
|
using | call_output_t = output_t |
|
using | VirtualMachineState_t = Super::VirtualMachineState_t |
|
typedef Bayesable< defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > > >::datum_t | datum_t |
|
typedef Bayesable< defaultdatum_t< Utterance, TruthValue >, std::vector< defaultdatum_t< Utterance, TruthValue > > >::data_t | data_t |
|
using | Grammar_t = MyGrammar |
|
using | input_t = Utterance |
|
using | output_t = TruthValue |
|
using | VirtualMachineState_t = typename MyGrammar ::VirtualMachineState_t |
|
using | ProposalType = std::optional< std::pair< InnerHypothesis, double > > |
|
typedef Args... | datum_t |
|
typedef std::vector< Args... > | data_t |
|
using | Super = LOTHypothesis< InnerHypothesis, CL, CL, Combinators::SKGrammar, grammar, defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > >, typename Combinators::SKGrammar ::VirtualMachineState_t > |
|
using | input_t = Super::input_t |
|
using | output_t = Super::output_t |
|
using | call_output_t = output_t |
|
using | VirtualMachineState_t = Super::VirtualMachineState_t |
|
typedef Bayesable< defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > > >::datum_t | datum_t |
|
typedef Bayesable< defaultdatum_t< CL, CL >, std::vector< defaultdatum_t< CL, CL > > >::data_t | data_t |
|
using | Grammar_t = Combinators::SKGrammar |
|
using | input_t = CL |
|
using | output_t = CL |
|
using | VirtualMachineState_t = typename Combinators::SKGrammar ::VirtualMachineState_t |
|
using | ProposalType = std::optional< std::pair< InnerHypothesis, double > > |
|
using | Super = LOTHypothesis< InnerHypothesis, BindingTree *, bool, MyGrammar, grammar, defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > >, typename MyGrammar ::VirtualMachineState_t > |
|
using | input_t = Super::input_t |
|
using | output_t = Super::output_t |
|
using | call_output_t = output_t |
|
using | VirtualMachineState_t = Super::VirtualMachineState_t |
|
typedef Bayesable< defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > > >::datum_t | datum_t |
|
typedef Bayesable< defaultdatum_t< BindingTree *, bool >, std::vector< defaultdatum_t< BindingTree *, bool > > >::data_t | data_t |
|
using | Grammar_t = MyGrammar |
|
using | input_t = BindingTree * |
|
using | output_t = bool |
|
using | VirtualMachineState_t = typename MyGrammar ::VirtualMachineState_t |
|
using | ProposalType = std::optional< std::pair< InnerHypothesis, double > > |
|
|
| InnerHypothesis (const InnerHypothesis &c) |
|
| InnerHypothesis (const InnerHypothesis &&c) |
|
InnerHypothesis & | operator= (const InnerHypothesis &c) |
|
InnerHypothesis & | operator= (const InnerHypothesis &&c) |
|
void | set_value (Node &v) |
|
void | set_value (Node &&v) |
|
virtual bool | cached_call_wrapper (const defaultdatum_t< BindingTree *, std::string > &di) override |
| This is how we access the data before calling – needed to say how this interfaces with the data. More...
|
|
virtual double | compute_prior () override |
| Compute the prior – defaultly just the PCFG (grammar) prior. More...
|
|
virtual std::optional< std::pair< InnerHypothesis, double > > | propose () const override |
| Default proposal is rational-rules style regeneration. More...
|
|
| InnerHypothesis (std::string s) |
|
| InnerHypothesis (const InnerHypothesis &c) |
|
| InnerHypothesis (const InnerHypothesis &&c) |
|
InnerHypothesis & | operator= (const InnerHypothesis &c) |
|
InnerHypothesis & | operator= (const InnerHypothesis &&c) |
|
void | set_value (Node &v) |
|
void | set_value (Node &&v) |
|
virtual double | compute_prior () override |
| Compute the prior – defaultly just the PCFG (grammar) prior. More...
|
|
virtual ProposalType | propose () const override |
| Default proposal is rational-rules style regeneration. More...
|
|
double | get_weight_fromcache () const |
| This computes the weight of this factor from its cached values. More...
|
|
virtual TruthValue | cached_call_wrapper (const Utterance &di) override |
| This is how we access the data before calling – needed to say how this interfaces with the data. More...
|
|
virtual output_t | call (const input_t x, const output_t &err=output_t{}) |
| A variant of call that assumes no stochasticity and therefore outputs only a single value. (This uses a nullptr virtual machine pool, so will throw an error on flip) More...
|
|
| LOTHypothesis () |
|
| LOTHypothesis (Node &x) |
|
| LOTHypothesis (Node &&x) |
|
| LOTHypothesis (std::string s) |
|
| LOTHypothesis (const LOTHypothesis &c) |
|
| LOTHypothesis (const LOTHypothesis &&c) |
|
LOTHypothesis & | operator= (const LOTHypothesis &c) |
|
LOTHypothesis & | operator= (const LOTHypothesis &&c) |
|
virtual InnerHypothesis | restart () const override |
| This is used to restart chains, sampling from prior but ONLY for nodes that are can_resample. More...
|
|
Node & | get_value () |
|
const Node & | get_value () const |
|
void | set_value (Node &v, bool should_compile=true) |
| Set the value to v. (NOTE: This compiles into a program) More...
|
|
void | set_value (Node &&v, bool should_compile=true) |
|
Grammar_t * | get_grammar () const |
|
virtual double | compute_single_likelihood (const datum_t &datum) override |
|
void | compile () |
|
virtual void | push_program (Program< VirtualMachineState_t > &s) override |
| This puts the code from my node onto s. Used internally in e.g. recursion. More...
|
|
virtual std::string | string (std::string prefix="") const override |
|
virtual std::string | string (std::string prefix, bool usedot) const |
|
virtual size_t | hash () const override |
|
virtual bool | operator== (const InnerHypothesis &h) const override |
| Equality is checked on equality of values; note that greater-than is still on posteriors. More...
|
|
virtual void | complete () override |
| Modify this hypothesis's value by (randomly) filling in all the gaps. More...
|
|
virtual int | neighbors () const override |
| Count the number of neighbors that are possible. (This should be size_t but int is more convenient.) More...
|
|
virtual void | expand_to_neighbor (int k) override |
| Modify this hypothesis to become the k'th neighbor. NOTE This does not compile since it might not be complete. More...
|
|
virtual double | neighbor_prior (int k) override |
| What is the prior of the k'th neighbor? This does not need to return the full prior, only relative (among ks) More...
|
|
virtual bool | is_evaluable () const override |
| A node is "evaluable" if it is complete (meaning no null subnodes) More...
|
|
size_t | recursion_count () |
| Count up how many times I use recursion – we keep a list of recursion here. More...
|
|
virtual std::string | serialize () const override |
| Convert this into a string which can be written to a file. More...
|
|
| MCMCable () |
|
virtual bool | operator!= (const InnerHypothesis &h) const |
|
| Bayesable () |
|
virtual void | clear_bayes () |
|
virtual double | compute_likelihood (const data_t &data, const double breakout=-infinity) |
| Compute the likelihood of a collection of data, by calling compute_single_likelihood on each. This stops if our likelihood falls below breakout. More...
|
|
virtual double | compute_posterior (const data_t &data, const std::pair< double, double > breakoutpair=std::make_pair(-infinity, 1.0)) |
| Compute the posterior, by calling prior and likelihood. This includes only a little bit of fanciness, which is that if our prior is -inf, then we don't both computing the likelihood. More...
|
|
virtual double | at_temperature (double t) const |
|
auto | operator (const Bayesable< datum_t, data_t > &other) const |
|
virtual void | show (std::string prefix="") |
|
virtual InnerHypothesis | make_neighbor (int k) const |
| Return a new hypothesis which is the k'th neighbor (just calls expand_to_neighbor) NOTE This does not compile since it might not be complete. More...
|
|
virtual void | push_program (Program< typename MyGrammar ::VirtualMachineState_t > &s, const short a) |
|
virtual void | push_program (Program< typename MyGrammar ::VirtualMachineState_t > &s, const int a) |
|
virtual void | push_program (Program< typename MyGrammar ::VirtualMachineState_t > &s, const std::string k) |
|
| CachedCallHypothesis () |
|
void | clear_cache () |
|
void | cached_call (const std::vector< Utterance > &data, bool break_on_error=true) |
|
virtual output_t | call (const input_t x, const output_t &err=output_t{}) |
| A variant of call that assumes no stochasticity and therefore outputs only a single value. (This uses a nullptr virtual machine pool, so will throw an error on flip) More...
|
|
| LOTHypothesis () |
|
| LOTHypothesis (Node &x) |
|
| LOTHypothesis (Node &&x) |
|
| LOTHypothesis (std::string s) |
|
| LOTHypothesis (const LOTHypothesis &c) |
|
| LOTHypothesis (const LOTHypothesis &&c) |
|
LOTHypothesis & | operator= (const LOTHypothesis &c) |
|
LOTHypothesis & | operator= (const LOTHypothesis &&c) |
|
virtual InnerHypothesis | restart () const override |
| This is used to restart chains, sampling from prior but ONLY for nodes that are can_resample. More...
|
|
Node & | get_value () |
|
const Node & | get_value () const |
|
void | set_value (Node &v, bool should_compile=true) |
| Set the value to v. (NOTE: This compiles into a program) More...
|
|
void | set_value (Node &&v, bool should_compile=true) |
|
Grammar_t * | get_grammar () const |
|
virtual double | compute_single_likelihood (const datum_t &datum) override |
|
void | compile () |
|
virtual void | push_program (Program< VirtualMachineState_t > &s) override |
| This puts the code from my node onto s. Used internally in e.g. recursion. More...
|
|
virtual std::string | string (std::string prefix="") const override |
|
virtual std::string | string (std::string prefix, bool usedot) const |
|
virtual size_t | hash () const override |
|
virtual bool | operator== (const InnerHypothesis &h) const override |
| Equality is checked on equality of values; note that greater-than is still on posteriors. More...
|
|
virtual void | complete () override |
| Modify this hypothesis's value by (randomly) filling in all the gaps. More...
|
|
virtual int | neighbors () const override |
| Count the number of neighbors that are possible. (This should be size_t but int is more convenient.) More...
|
|
virtual void | expand_to_neighbor (int k) override |
| Modify this hypothesis to become the k'th neighbor. NOTE This does not compile since it might not be complete. More...
|
|
virtual double | neighbor_prior (int k) override |
| What is the prior of the k'th neighbor? This does not need to return the full prior, only relative (among ks) More...
|
|
virtual bool | is_evaluable () const override |
| A node is "evaluable" if it is complete (meaning no null subnodes) More...
|
|
size_t | recursion_count () |
| Count up how many times I use recursion – we keep a list of recursion here. More...
|
|
virtual std::string | serialize () const override |
| Convert this into a string which can be written to a file. More...
|
|
| MCMCable () |
|
virtual bool | operator!= (const InnerHypothesis &h) const |
|
virtual InnerHypothesis | make_neighbor (int k) const |
| Return a new hypothesis which is the k'th neighbor (just calls expand_to_neighbor) NOTE This does not compile since it might not be complete. More...
|
|
virtual void | push_program (Program< typename Combinators::SKGrammar ::VirtualMachineState_t > &s, const short a) |
|
virtual void | push_program (Program< typename Combinators::SKGrammar ::VirtualMachineState_t > &s, const int a) |
|
virtual void | push_program (Program< typename Combinators::SKGrammar ::VirtualMachineState_t > &s, const std::string k) |
|
virtual output_t | call (const input_t x, const output_t &err=output_t{}) |
| A variant of call that assumes no stochasticity and therefore outputs only a single value. (This uses a nullptr virtual machine pool, so will throw an error on flip) More...
|
|
| LOTHypothesis () |
|
| LOTHypothesis (Node &x) |
|
| LOTHypothesis (Node &&x) |
|
| LOTHypothesis (std::string s) |
|
| LOTHypothesis (const LOTHypothesis &c) |
|
| LOTHypothesis (const LOTHypothesis &&c) |
|
LOTHypothesis & | operator= (const LOTHypothesis &c) |
|
LOTHypothesis & | operator= (const LOTHypothesis &&c) |
|
virtual InnerHypothesis | restart () const override |
| This is used to restart chains, sampling from prior but ONLY for nodes that are can_resample. More...
|
|
Node & | get_value () |
|
const Node & | get_value () const |
|
void | set_value (Node &v, bool should_compile=true) |
| Set the value to v. (NOTE: This compiles into a program) More...
|
|
void | set_value (Node &&v, bool should_compile=true) |
|
Grammar_t * | get_grammar () const |
|
virtual double | compute_single_likelihood (const datum_t &datum) override |
|
void | compile () |
|
virtual void | push_program (Program< VirtualMachineState_t > &s) override |
| This puts the code from my node onto s. Used internally in e.g. recursion. More...
|
|
virtual std::string | string (std::string prefix="") const override |
|
virtual std::string | string (std::string prefix, bool usedot) const |
|
virtual size_t | hash () const override |
|
virtual bool | operator== (const InnerHypothesis &h) const override |
| Equality is checked on equality of values; note that greater-than is still on posteriors. More...
|
|
virtual void | complete () override |
| Modify this hypothesis's value by (randomly) filling in all the gaps. More...
|
|
virtual int | neighbors () const override |
| Count the number of neighbors that are possible. (This should be size_t but int is more convenient.) More...
|
|
virtual void | expand_to_neighbor (int k) override |
| Modify this hypothesis to become the k'th neighbor. NOTE This does not compile since it might not be complete. More...
|
|
virtual double | neighbor_prior (int k) override |
| What is the prior of the k'th neighbor? This does not need to return the full prior, only relative (among ks) More...
|
|
virtual bool | is_evaluable () const override |
| A node is "evaluable" if it is complete (meaning no null subnodes) More...
|
|
size_t | recursion_count () |
| Count up how many times I use recursion – we keep a list of recursion here. More...
|
|
virtual std::string | serialize () const override |
| Convert this into a string which can be written to a file. More...
|
|
| MCMCable () |
|
virtual bool | operator!= (const InnerHypothesis &h) const |
|
virtual InnerHypothesis | make_neighbor (int k) const |
| Return a new hypothesis which is the k'th neighbor (just calls expand_to_neighbor) NOTE This does not compile since it might not be complete. More...
|
|
| CachedCallHypothesis () |
|
void | clear_cache () |
|
void | cached_call (const std::vector< defaultdatum_t< BindingTree *, std::string > > &data, bool break_on_error=true) |
|