OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
a TruthValue that stores a mean and the number of observations (strength and confidence) More...
#include <FuzzyTruthValue.h>
Public Member Functions | |
FuzzyTruthValue (strength_t mean, count_t count) | |
FuzzyTruthValue (const TruthValue &) | |
FuzzyTruthValue (FuzzyTruthValue 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=DEFAULT) const |
TruthValuePtr | clone () const |
TruthValue * | rawclone () const |
![]() | |
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 FuzzyTruthValuePtr | createSTV (strength_t mean, count_t count) |
static TruthValuePtr | createTV (strength_t mean, count_t count) |
![]() | |
static TruthValuePtr | NULL_TV () |
static TruthValuePtr | TRUE_TV () |
static TruthValuePtr | DEFAULT_TV () |
static TruthValuePtr | FALSE_TV () |
static TruthValuePtr | TRIVIAL_TV () |
Protected Member Functions | |
void | init (strength_t mean, count_t count) |
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 FuzzyTruthValue.h.
FuzzyTruthValue::FuzzyTruthValue | ( | strength_t | mean, |
count_t | count | ||
) |
Definition at line 42 of file FuzzyTruthValue.cc.
References count, reorder_log::m, and mean.
FuzzyTruthValue::FuzzyTruthValue | ( | const TruthValue & | source | ) |
Definition at line 48 of file FuzzyTruthValue.cc.
References count, opencog::TruthValue::getCount(), opencog::TruthValue::getMean(), and mean.
FuzzyTruthValue::FuzzyTruthValue | ( | FuzzyTruthValue const & | source | ) |
Definition at line 53 of file FuzzyTruthValue.cc.
|
inlinevirtual |
Implements opencog::TruthValue.
Definition at line 99 of file FuzzyTruthValue.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 122 of file FuzzyTruthValue.cc.
References KKK.
|
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 130 of file FuzzyTruthValue.cc.
References KKK.
|
inlinestatic |
|
inlinestatic |
Definition at line 94 of file FuzzyTruthValue.h.
References createSTV().
|
virtual |
Implements opencog::TruthValue.
Definition at line 69 of file FuzzyTruthValue.cc.
References count, and countToConfidence().
|
virtual |
Implements opencog::TruthValue.
Definition at line 64 of file FuzzyTruthValue.cc.
References count.
|
virtual |
Implements opencog::TruthValue.
Definition at line 59 of file FuzzyTruthValue.cc.
References mean.
|
virtual |
Implements opencog::TruthValue.
Definition at line 117 of file FuzzyTruthValue.cc.
References opencog::FUZZY_TRUTH_VALUE.
|
protected |
|
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 75 of file FuzzyTruthValue.cc.
References clone(), getConfidence(), 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 98 of file FuzzyTruthValue.cc.
References count, FLOAT_ACCEPTABLE_COUNT_ERROR, FLOAT_ACCEPTABLE_MEAN_ERROR, and mean.
|
inlinevirtual |
Implements opencog::TruthValue.
Definition at line 103 of file FuzzyTruthValue.h.
References FuzzyTruthValue().
|
virtual |
Implements opencog::TruthValue.
Definition at line 89 of file FuzzyTruthValue.cc.
References getConfidence(), and getMean().
|
protected |
Total number of observations used to estimate the mean.
Definition at line 50 of file FuzzyTruthValue.h.
|
protected |
Mean of the strength of the TV over all observations.
Definition at line 47 of file FuzzyTruthValue.h.