OpenCog Framework
Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
|
#include <IndefiniteTruthValue.h>
Static Public Member Functions | |
static IndefiniteTruthValuePtr | createITV (TruthValuePtr tv) |
static TruthValuePtr | createTV (TruthValuePtr tv) |
static IndefiniteTruthValuePtr | createITV (strength_t l, strength_t u, confidence_t c=DEFAULT_CONFIDENCE_LEVEL) |
static TruthValuePtr | createTV (strength_t l, strength_t u, confidence_t c=DEFAULT_CONFIDENCE_LEVEL) |
static void | setDefaultConfidenceLevel (confidence_t c) |
static void | setDefaultK (count_t k) |
![]() | |
static TruthValuePtr | NULL_TV () |
static TruthValuePtr | TRUE_TV () |
static TruthValuePtr | DEFAULT_TV () |
static TruthValuePtr | FALSE_TV () |
static TruthValuePtr | TRIVIAL_TV () |
Static Public Attributes | |
static confidence_t | DEFAULT_CONFIDENCE_LEVEL = 0.9 |
static count_t | DEFAULT_K = 2.0 |
static strength_t | diffError = 0.001 |
static strength_t | s = 0.5 |
Private Member Functions | |
void | init (strength_t l=0.0f, strength_t u=0.0f, confidence_t c=DEFAULT_CONFIDENCE_LEVEL) |
void | copy (const IndefiniteTruthValue &) |
strength_t | findDiff (strength_t idiff) |
find diff by dichotomy More... | |
Private Attributes | |
strength_t | U |
strength_t | L |
confidence_t | confidenceLevel |
referred as "b" in the paper More... | |
bool | symmetric |
strength_t | diff |
std::vector< strength_t * > | firstOrderDistribution |
mean, count, confidence | |
below, "mean", "count" and "confidence" are all three attributes used to translate an indefinite TV into a simple TV. If "mean" (as well as "count" or "confidence") is negative it means that it outdated and therefore must be recalculted, otherwise, i.e. positive of null, it means that the current value is correct | |
strength_t | mean |
count_t | count |
confidence_t | confidence |
Indefinite probabilities are in the form ([L,U],b,N). In practical work, N will be hold constant and thus we have only ([L,U],b).
Definition at line 50 of file IndefiniteTruthValue.h.
IndefiniteTruthValue::IndefiniteTruthValue | ( | ) |
Definition at line 111 of file IndefiniteTruthValue.cc.
References init().
IndefiniteTruthValue::IndefiniteTruthValue | ( | strength_t | l, |
strength_t | u, | ||
confidence_t | c = DEFAULT_CONFIDENCE_LEVEL |
||
) |
Definition at line 116 of file IndefiniteTruthValue.cc.
References init().
IndefiniteTruthValue::IndefiniteTruthValue | ( | IndefiniteTruthValue const & | source | ) |
Definition at line 122 of file IndefiniteTruthValue.cc.
References copy().
|
inlinevirtual |
Implements opencog::TruthValue.
Definition at line 148 of file IndefiniteTruthValue.h.
|
private |
Definition at line 99 of file IndefiniteTruthValue.cc.
References confidence, confidenceLevel, count, diff, L, mean, symmetric, and U.
|
inlinestatic |
Definition at line 123 of file IndefiniteTruthValue.h.
References opencog::INDEFINITE_TRUTH_VALUE.
|
inlinestatic |
Definition at line 136 of file IndefiniteTruthValue.h.
|
inlinestatic |
Definition at line 131 of file IndefiniteTruthValue.h.
References createITV().
|
inlinestatic |
Definition at line 142 of file IndefiniteTruthValue.h.
References createITV().
|
private |
find diff by dichotomy
Definition at line 162 of file IndefiniteTruthValue.cc.
References confidenceLevel, DEFAULT_K, DensityIntegral(), diffError, L, python.bindlink::result, s, and U.
|
virtual |
Implements opencog::TruthValue.
Definition at line 289 of file IndefiniteTruthValue.cc.
References confidence, DEFAULT_K, and getCount().
confidence_t IndefiniteTruthValue::getConfidenceLevel | ( | ) | const |
Definition at line 198 of file IndefiniteTruthValue.cc.
References confidenceLevel.
|
virtual |
Implements opencog::TruthValue.
Definition at line 278 of file IndefiniteTruthValue.cc.
References count, DEFAULT_K, and W.
strength_t IndefiniteTruthValue::getDiff | ( | ) |
Definition at line 147 of file IndefiniteTruthValue.cc.
References diff, findDiff(), L, and U.
const std::vector< strength_t * > & IndefiniteTruthValue::getFirstOrderDistribution | ( | ) | const |
Definition at line 203 of file IndefiniteTruthValue.cc.
References firstOrderDistribution.
strength_t IndefiniteTruthValue::getL | ( | ) | const |
Definition at line 138 of file IndefiniteTruthValue.cc.
References L.
strength_t IndefiniteTruthValue::getL_ | ( | ) | const |
Definition at line 214 of file IndefiniteTruthValue.cc.
|
virtual |
Implements opencog::TruthValue.
Definition at line 270 of file IndefiniteTruthValue.cc.
|
virtual |
Implements opencog::TruthValue.
Definition at line 260 of file IndefiniteTruthValue.cc.
References opencog::INDEFINITE_TRUTH_VALUE.
strength_t IndefiniteTruthValue::getU | ( | ) | const |
Definition at line 142 of file IndefiniteTruthValue.cc.
References U.
strength_t IndefiniteTruthValue::getU_ | ( | ) | const |
Definition at line 208 of file IndefiniteTruthValue.cc.
|
private |
Definition at line 82 of file IndefiniteTruthValue.cc.
References confidence, confidenceLevel, count, diff, firstOrderDistribution, L, mean, symmetric, and U.
bool IndefiniteTruthValue::isSymmetric | ( | ) | const |
Definition at line 298 of file IndefiniteTruthValue.cc.
References symmetric.
|
virtual |
Merge this TV object with the given TV object argument. It always returns a new TV object with the result of the merge, even if it is equal to one of the merged TV objects.
ms | the merge style as described in https://github.com/opencog/opencog/issues/1295 |
Implements opencog::TruthValue.
Definition at line 304 of file IndefiniteTruthValue.cc.
References clone(), and getConfidence().
|
virtual |
it is a strict equality comparison, without error interval tolerance
Implements opencog::TruthValue.
Definition at line 127 of file IndefiniteTruthValue.cc.
References confidenceLevel, L, and U.
|
inlinevirtual |
Implements opencog::TruthValue.
Definition at line 153 of file IndefiniteTruthValue.h.
References IndefiniteTruthValue().
void IndefiniteTruthValue::setConfidenceLevel | ( | confidence_t | c | ) |
Definition at line 245 of file IndefiniteTruthValue.cc.
References confidenceLevel.
|
inlinestatic |
Definition at line 162 of file IndefiniteTruthValue.h.
References DEFAULT_CONFIDENCE_LEVEL.
|
inlinestatic |
Definition at line 165 of file IndefiniteTruthValue.h.
References DEFAULT_K.
void IndefiniteTruthValue::setDiff | ( | strength_t | diff | ) |
Definition at line 250 of file IndefiniteTruthValue.cc.
References diff.
void IndefiniteTruthValue::setFirstOrderDistribution | ( | const std::vector< strength_t * > & | v | ) |
Definition at line 255 of file IndefiniteTruthValue.cc.
References firstOrderDistribution.
void IndefiniteTruthValue::setL | ( | strength_t | l | ) |
Definition at line 221 of file IndefiniteTruthValue.cc.
References confidence, count, diff, L, and mean.
void IndefiniteTruthValue::setMean | ( | strength_t | m | ) |
Definition at line 265 of file IndefiniteTruthValue.cc.
References reorder_log::m, and mean.
|
inline |
Definition at line 109 of file IndefiniteTruthValue.h.
void IndefiniteTruthValue::setU | ( | strength_t | u | ) |
Definition at line 233 of file IndefiniteTruthValue.cc.
References confidence, count, diff, mean, and U.
|
virtual |
Implements opencog::TruthValue.
Definition at line 312 of file IndefiniteTruthValue.cc.
References confidenceLevel, diff, L, mean, symmetric, and U.
|
mutableprivate |
Definition at line 75 of file IndefiniteTruthValue.h.
|
private |
referred as "b" in the paper
Definition at line 56 of file IndefiniteTruthValue.h.
|
mutableprivate |
Definition at line 74 of file IndefiniteTruthValue.h.
|
static |
Definition at line 158 of file IndefiniteTruthValue.h.
|
static |
Definition at line 159 of file IndefiniteTruthValue.h.
|
private |
used in inference rule procedure in order to compute L1 and U1 when diff is negative it means that it is outdated and must be recalculated
Definition at line 62 of file IndefiniteTruthValue.h.
|
static |
Definition at line 160 of file IndefiniteTruthValue.h.
|
private |
Definition at line 78 of file IndefiniteTruthValue.h.
|
private |
Definition at line 55 of file IndefiniteTruthValue.h.
|
mutableprivate |
Definition at line 73 of file IndefiniteTruthValue.h.
|
static |
Definition at line 161 of file IndefiniteTruthValue.h.
|
private |
Definition at line 57 of file IndefiniteTruthValue.h.
|
private |
Definition at line 54 of file IndefiniteTruthValue.h.