|
OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
a TruthValue that stores a mean and the number of observations (strength and confidence) More...
#include <SimpleTruthValue.h>
Inheritance diagram for opencog::SimpleTruthValue:
Collaboration diagram for opencog::SimpleTruthValue:Public Member Functions | |
| void | initialize (strength_t new_mean, count_t new_count) |
| SimpleTruthValue (strength_t mean, count_t count) | |
| SimpleTruthValue (const TruthValue &) | |
| SimpleTruthValue (SimpleTruthValue const &) | |
| virtual bool | operator== (const TruthValue &rhs) const |
| std::string | toString () const |
| TruthValueType | getType () const |
| strength_t | getMean () const |
| count_t | getCount () const |
| confidence_t | getConfidence () const |
| TruthValuePtr | merge (TruthValuePtr, TVMergeStyle ms) const |
| TruthValuePtr | clone () const |
| TruthValue * | rawclone () const |
Public Member Functions inherited from opencog::TruthValue | |
| virtual | ~TruthValue () |
| bool | operator!= (const TruthValue &rhs) const |
| virtual bool | isNullTv () const |
| virtual bool | isDefaultTV () const |
Static Public Member Functions | |
| static count_t | confidenceToCount (confidence_t) |
| static confidence_t | countToConfidence (count_t) |
| static SimpleTruthValuePtr | createSTV (strength_t mean, count_t count) |
| static TruthValuePtr | createTV (strength_t mean, count_t count) |
Static Public Member Functions inherited from opencog::TruthValue | |
| static TruthValuePtr | NULL_TV () |
| static TruthValuePtr | TRUE_TV () |
| static TruthValuePtr | DEFAULT_TV () |
| static TruthValuePtr | FALSE_TV () |
| static TruthValuePtr | TRIVIAL_TV () |
Protected Attributes | |
| strength_t | mean |
| Mean of the strength of the TV over all observations. More... | |
| count_t | count |
| Total number of observations used to estimate the mean. More... | |
a TruthValue that stores a mean and the number of observations (strength and confidence)
Definition at line 42 of file SimpleTruthValue.h.
| SimpleTruthValue::SimpleTruthValue | ( | strength_t | mean, |
| count_t | count | ||
| ) |
Definition at line 43 of file SimpleTruthValue.cc.
References count, reorder_log::m, and mean.
Here is the caller graph for this function:| SimpleTruthValue::SimpleTruthValue | ( | const TruthValue & | source | ) |
Definition at line 49 of file SimpleTruthValue.cc.
References count, opencog::TruthValue::getCount(), opencog::TruthValue::getMean(), and mean.
| SimpleTruthValue::SimpleTruthValue | ( | SimpleTruthValue const & | source | ) |
Definition at line 54 of file SimpleTruthValue.cc.
|
inlinevirtual |
Implements opencog::TruthValue.
Definition at line 99 of file SimpleTruthValue.h.
|
static |
Heuristic to compute the count given the confidence (according to the PLN book) count = confidence * k / (1 - confidence) where k is the look-ahead
Definition at line 130 of file SimpleTruthValue.cc.
References KKK.
Here is the caller graph for this function:
|
static |
Heuristic to compute the confidence given the count (according to the PLN book) confidence = count / (count + k) where k is the look-ahead
Definition at line 138 of file SimpleTruthValue.cc.
References KKK.
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
Definition at line 94 of file SimpleTruthValue.h.
References createSTV().
Here is the caller graph for this function:
|
virtual |
Implements opencog::TruthValue.
Definition at line 70 of file SimpleTruthValue.cc.
References count, and countToConfidence().
Here is the caller graph for this function:
|
virtual |
Implements opencog::TruthValue.
Definition at line 65 of file SimpleTruthValue.cc.
References count.
Here is the caller graph for this function:
|
virtual |
Implements opencog::TruthValue.
Definition at line 60 of file SimpleTruthValue.cc.
References mean.
Here is the caller graph for this function:
|
virtual |
Implements opencog::TruthValue.
Definition at line 125 of file SimpleTruthValue.cc.
References opencog::SIMPLE_TRUTH_VALUE.
|
inline |
Definition at line 53 of file SimpleTruthValue.h.
|
virtual |
Truth value merge formula, as specified by PLN.
Currently tv1.merge(tv2) works as follows: the resulting TV is either tv1 or tv2, the result being the one with the highest confidence.
Implements opencog::TruthValue.
Definition at line 76 of file SimpleTruthValue.cc.
References count, CVAL, opencog::DEFAULT, mean, and opencog::SIMPLE_TRUTH_VALUE.
|
virtual |
Equality. Used to determine if two truth values are the same, or not. Primarily useful see if a TV is equal to NULL_TV, TRUE_TV, FALSE_TV, etc.
Implements opencog::TruthValue.
Definition at line 106 of file SimpleTruthValue.cc.
References count, FLOAT_ACCEPTABLE_COUNT_ERROR, FLOAT_ACCEPTABLE_MEAN_ERROR, and mean.
|
inlinevirtual |
Implements opencog::TruthValue.
Definition at line 103 of file SimpleTruthValue.h.
References SimpleTruthValue().
|
virtual |
Implements opencog::TruthValue.
Definition at line 97 of file SimpleTruthValue.cc.
References getConfidence(), and getMean().
|
protected |
Total number of observations used to estimate the mean.
Definition at line 50 of file SimpleTruthValue.h.
|
protected |
Mean of the strength of the TV over all observations.
Definition at line 47 of file SimpleTruthValue.h.