Hi Shujing,

On 07/09/2017 11:34 PM, Shujing Ke wrote:
Hi, thanks,

I just implemented quoting the output patterns and the return AtomSpace:

 1. There is a "if_quote_output_pattern" in config file, if it is set to
    true, the patterns will be quoted.
 2. The quote link type can be define with
    "output_pattern_quoted_linktype" in the config file, the default is
    MinedPatternLink.
 3. The Frequency, InteractionInformation, Surpringness I and II value
    are stored in the keyvalue pair of "PatternValues" of the
    MinedPatternLink. Can be query by:
    MinedPatternLink->getValue(PatternValuesHandle).
 4. Also after mining is finished, the AtomSpace contains all the
    patterns can be get by the interface: getResultAtomSpace(). By
    AtomSpace interface: get_handles_by_type (MINED_PATTERN_LINK ....).

That looks good, I think we can stick with this API for the time being.


For example:
(MinedPatternLink
     (EvaluationLink
         (PredicateNode "background")
         (ListLink
             (VariableNode "$var_1")
             (ConceptNode "solo_singer")
          )
     )
    (EvaluationLink
        (PredicateNode "occupation")
        (ListLink
            (VariableNode "$var_1")
            (ConceptNode "Singer-songwriter")
        )
     )
)


I had a quick look at the Pattern Miner clean up issue. I will try to
fix some of them by the way when I modify the related content. Of course
you are very welcome to fix things you think should be fixed. Just it
would be nice if you can notify me before you start to fix them. Because
I am still making a lot of changes, which always have a lot of conflicts
with some small changes you and Linas fixed, and because they usually
occurred on a lot of codes I had modified or just deleted, so I always
cannot merge them... Recently I just spent hours to fix all the
conflicts. If they are not very very important / core or emergent, maybe
we can postpone all the cleanups until I finish the current pattern
mining work stage?

Sure no problem, just notify me when you are done with work on the pattern miner.


I picked some instances from the corpus you gave me early to experiment
with the new interestingness evaluation for them.

More will come soon (end of this week I think).

Thanks,
Nil


Thanks,
Shujing


        


On Mon, Jun 26, 2017 at 7:43 AM, Nil Geisweiller
<ngeis...@googlemail.com <mailto:ngeis...@googlemail.com>> wrote:

    Shujing,

    On 06/25/2017 05:06 PM, Shujing Ke wrote:

        My son seems better today, starts to be playful again and more
        willing
        to eat and drink. But still have diarrhea.


    Great!


        I will implement exporting patterns first. And then the
        interestingness
        evaluation inside 1-gram pattern when Nil gives the small test
        corpus.


    BTW, there's gonna be a bit of time before I can hand you the corpus
    as I'm attempting to generate it from an actual inference control
    learning experiment, I'd say in a week or so.

    Meanwhile if you could take a look at

    https://github.com/opencog/opencog/issues/2787
    <https://github.com/opencog/opencog/issues/2787>

    specifically the first item which is a question to you. Also, having
    the pattern miner unit test pass would be great. As I explain at the
    end of the issue, I may prefer to do these changes myself as they
    will help me to get familiar with the pattern miner code. Of course
    if you'd rather take care of them, for educational purpose or
    whatnot, you are free to do so as well.

    Nil


        Thanks,
        Shujing

        On Sun, Jun 25, 2017 at 9:33 AM, Ben Goertzel <b...@goertzel.org
        <mailto:b...@goertzel.org>
        <mailto:b...@goertzel.org <mailto:b...@goertzel.org>>> wrote:

            Hi Shujing,

            > 4. About the interestingness evalution
            >
            > I didn't quite get the meaning of the rich(x) and z(y) and
            married(x,y)
            > example.
            > I think it is also related to the pattern gram. For below 2
            patterns: x,y,z
            > are variables
            > pattern A:  rich(x) and z(y) and married(x,y)
            > pattern B:  rich(x) and cute(y) and married(x,y)
            >
            > If they are represented as 3 gram patterns, then it may be
        able to
            just
            > evaluate their interesingness by surpringness
            > pattern A:
            > InheritanceLink  x  rich
            > InheritanceLink  y  z
            > EvaluationLink married x y
            >
            > pattern B:
            > InheritanceLink  x  rich
            > InheritanceLink  y  cute
            > EvaluationLink married x y
            >
            > If they are represented as 1 gram patterns, then I can
        implement an
            > interestingness evalution based on the variables inside
        one root link.
            > pattern A:
            > ImplicationLink
            >     AndLink
            >         InheritanceLink  x  rich
            >         InheritanceLink  y  z
            >     EvaluationLink married x y
            >
            > pattern B:
            > ImplicationLink
            >     AndLink
            >         InheritanceLink  x  rich
            >         InheritanceLink  y  z
            >     EvaluationLink married x y

            Well it seems that the mathematical basis of the interestingness
            evaluation is the same whether we view this as a 3-gram
        pattern or as
            a 1-gram pattern

            So I guess the answer is that, yeah, the interestingness
        evaluation
            has to be able to look at multiple variables within a
        "1-gram" and
            also across different "grams" ...

            There may be surprisingness

            -- within a single "gram"

            -- among multiple "grams"

            -- involving, say, 2 variables in one gram, and then 2
        variables in
            another gram

            (where i'm using "gram" as a shorthand for "set of Atoms
        supervened
            over by a single root link")

            ben

            --
            You received this message because you are subscribed to the
        Google
            Groups "opencog" group.
            To unsubscribe from this group and stop receiving emails
        from it,
            send an email to opencog+unsubscr...@googlegroups.com
        <mailto:opencog%2bunsubscr...@googlegroups.com>
            <mailto:opencog%2bunsubscr...@googlegroups.com
        <mailto:opencog%252bunsubscr...@googlegroups.com>>.
            To post to this group, send email to
        opencog@googlegroups.com <mailto:opencog@googlegroups.com>
            <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>>.
            Visit this group at https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>
            <https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>>.
            To view this discussion on the web visit

        
https://groups.google.com/d/msgid/opencog/CACYTDBe16V6TD6JC%3DQDVAd63fWpzbVe6sh3wtkqNz3bXpiYiuQ%40mail.gmail.com
        
<https://groups.google.com/d/msgid/opencog/CACYTDBe16V6TD6JC%3DQDVAd63fWpzbVe6sh3wtkqNz3bXpiYiuQ%40mail.gmail.com>

        
<https://groups.google.com/d/msgid/opencog/CACYTDBe16V6TD6JC%3DQDVAd63fWpzbVe6sh3wtkqNz3bXpiYiuQ%40mail.gmail.com
        
<https://groups.google.com/d/msgid/opencog/CACYTDBe16V6TD6JC%3DQDVAd63fWpzbVe6sh3wtkqNz3bXpiYiuQ%40mail.gmail.com>>.
            For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>
            <https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>>.




--
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to opencog+unsubscr...@googlegroups.com.
To post to this group, send email to opencog@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/9aa42ec4-bffc-cdbc-e10f-c58e4fe68f74%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to