-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PLN revisionFormula issue with count #587
Comments
cc: @moikle this might interest you as well |
I propose renaming SimpleTruthValue to PLNTruthValue. This opens the door to putting the various math formulas into PLNTruthValue, which would be faster in C++ than in python, and might make the python code look cleaner? |
No, it wouldn't be. On Wed, Mar 12, 2014 at 9:33 AM, Linas Vepstas notifications@github.comwrote:
|
Hmmm... Regardless of whether SimpleTruthValue is renamed to SimplePLNTruthValue Truth value formula execution is not remotely our bottleneck; the ben On Wed, Mar 12, 2014 at 5:33 PM, jadeoneill notifications@github.comwrote:
Ben Goertzel, PhD "In an insane world, the sane man must appear to be insane". -- Capt. James "Emancipate yourself from mental slavery / None but ourselves can free our |
@jadeoneill can you comment on my original post? |
The revision formula should definitely be in python, like the rest of the On Thu, Mar 13, 2014 at 4:42 AM, Cosmo Harrigan notifications@github.comwrote:
|
How shall the redundancy assumption parameter |
Just make it up to start with. Ben might come up with some formula (i don't On Thu, Mar 13, 2014 at 8:23 AM, Cosmo Harrigan notifications@github.comwrote:
|
Several issues that are being overlooked:
The reason this is unavoidable is the following: When the atomspace contains an atom, and some user attempts to place an identical atom into the atomspace, but having a different truth value, one MUST decide what to do. One can do anything: discard the old truth value. Discard the new truth value. Do some fancy mathematical merge of the two. Doesn't mater (to me) what is done, however, something must be done.
|
The revision rule seems a special case to me... I think most PLN formulas should be in python, as PLN is in python and this However, as Linas points out, the revision formula is not just invoked About renaming. I don't mind if you rename SimpleTruthValue to ben On Thu, Mar 13, 2014 at 6:51 AM, Linas Vepstas notifications@github.comwrote:
Ben Goertzel, PhD "In an insane world, the sane man must appear to be insane". -- Capt. James "Emancipate yourself from mental slavery / None but ourselves can free our |
There is this note that Linas had added on some wiki pages, such as this one:
In the PLN book, it talks about truth values representing fuzzy set membership and MemberLinks, and it also talks about truth values representing probabilities. Can you explain further what one needs to watch out for in the context of PLN? |
Ben, Help me pick some good names. It's clear that "SimpleTruthValues" are not simple at all, they need a better descriptive name. I think FuzzyTruthValue is probably sufficient, as SimpleFuzzyPLNTruthValue is getting silly. The goal here is to allow the programmer to know what they're dealing with, and to throw an assert when the programmer accidentally uses of combines inappropriate truth values. Lets keep the names simple, short, direct, and meaningful. |
A standard FuzzyTruthValue would have only one number, the fuzzy set A FuzzyPLNTruthValue is different from that, because it has a The complicated names are meaningful, silly as they may seem.. I.e. PLN really does have notions of: a simple fuzzy truth value [with a So I think FuzzyPLNTruthValue is an OK name. Simply calling the fuzzy TV In summary, I think it would be OK to replace SimpleTruthValue with The complexity swept under the rug by this terminology is that Note that we could also have ProbabilityTruthValue // just a single probability None of these have users at the moment, but the are logically sensible... For the Zen Buddhists, we can also use UnaryTruthValue // everything is true! ;-) SUMMARY: my recommendation is for a list of types like BinaryTruthValue PLNSimpleTruthValue *** and then others as needed... It happens that the two marked *** are the ones we're using right now for -- Ben -- Ben On Thu, Mar 13, 2014 at 9:50 AM, Linas Vepstas notifications@github.comwrote:
Ben Goertzel, PhD "In an insane world, the sane man must appear to be insane". -- Capt. James "Emancipate yourself from mental slavery / None but ourselves can free our |
How is the current PLN implementation distinguishing between those two? |
The distinction is made inside the derivation of the truth value formulas So in the current version the distinction btw PLNSimpleTV and PLNFuzzyTV is ben On Thu, Mar 13, 2014 at 10:20 AM, Cosmo Harrigan
Ben Goertzel, PhD "In an insane world, the sane man must appear to be insane". -- Capt. James "Emancipate yourself from mental slavery / None but ourselves can free our |
Ok, I see. Sorry for many questions, but: where do you suggest would be a convenient place for me to review the enumeration of which link types should belong to which category? |
Hmmm.... That's not systematically written down anywhere though it's MemberLink and EvaluationLink are the big PLNFuzzyTV guys... I can't think No need to apologize, the questions are good, useful ones ;) On Thu, Mar 13, 2014 at 10:34 AM, Cosmo Harrigan
Ben Goertzel, PhD "In an insane world, the sane man must appear to be insane". -- Capt. James "Emancipate yourself from mental slavery / None but ourselves can free our |
Ok, thanks, I am stepping out now as well, but I think this enumeration is something to revisit and make explicit. |
Yes, that's a good question: point is: I'm using EvaluationLink's to store counting information about discovered patterns. So e.g. EvaluationLink (frequency-counts-and-entropy-truth-value) which tells me about how often the Blahatoms have been observed in some relationship type. Ideally, no one should run this through PLN, but good programming hygiene says that such accidents are best avoided by throwing an error when they occur. Thus, having an implicit truth type depending on the atom type is ... maybe acceptable for now, but somewhat dangerous ... |
Improve the revision formula (#587) and test the boolean transformation rules
This issue still persists: instead of
it has now been replaced by
with
where 0.5 is an arbitrary number. The result is that count rapidly grows very large until it approaches its maximum value of 4473923584. In practice, that rapid increase in count can cause confidence to behave "more like" a boolean rather than a range between 0 and 1, because any non-zero value will rapidly approach 1, which would seem to eliminate most of its usefulness. How should this revision formula be fixed? |
I'll look at this and other PLN issues in 6-7 hours when I'm at the On Tue, Mar 25, 2014 at 8:29 AM, Cosmo Harrigan notifications@github.comwrote:
Ben Goertzel, PhD "In an insane world, the sane man must appear to be insane". -- Capt. James "Emancipate yourself from mental slavery / None but ourselves can free our |
Hmmm... I'd need to understand the context better, to understand what are the Atoms If we want to consider a model in which there we assume N pieces of n = x.count + r( max(x.count, y.count) ) * [ y.count - min(x.count, y.count) ] where r is a function defined by, say, r( N) = 0 r(1) = 1 or near 1 and r is monotone So e.g. we could have r(x) = ( 1-x/N )^+ I guess a different, nonlinear form for r(x) could be derived from some The idea is that as max(x.count, y.count) gets closer and closer to N, the percentage of redundant evidence -- Ben On Tue, Mar 25, 2014 at 8:29 AM, Cosmo Harrigan notifications@github.comwrote:
Ben Goertzel, PhD "In an insane world, the sane man must appear to be insane". -- Capt. James "Emancipate yourself from mental slavery / None but ourselves can free our |
Closing; this appears to be based on the now-obsolete python-PLN codebase |
While running PLN, I noticed that the count attribute of some truth values was growing very large.
PLN is using a revisionFormula:
https://github.com/opencog/opencog/blob/master/opencog/python/pln/rules/formulas.py#L483
which is called in chainers.py here:
https://github.com/opencog/opencog/blob/master/opencog/python/pln/chainers.py#L726
It sets the new count to be the old count plus the new count:
https://github.com/opencog/opencog/blob/master/opencog/python/pln/rules/formulas.py#L479
n = x.count+y.count
I think that will cause the count to grow very large.
I suspect this may not be correct.
In the PLN book on page 116, it mentions:
in this simple case, my guess is that the sets of evidence are closer to being redundant, which would mean the c value was close to 1, causing the new truth value count to approach the max of either n1 or n2, rather than the sum of both of them.
Furthermore, isn't truth value revision currently implemented as the responsibility of the C++ TruthValue::merge class? Shouldn't it be encapsulated once, in one place, whether that's in PLN or in the TruthValue class, rather than doing it two different ways?
@jadeoneill what are your thoughts?
The text was updated successfully, but these errors were encountered: