US and Worldwide: +1 (866) 660-7555
Results 1 to 6 of 6

Thread: Name of variables at FPGrowth in weka

  1. #1
    Join Date
    May 2012
    Posts
    3

    Default Name of variables at FPGrowth in weka

    hello, I have learned and understand the concept and theory of FPGrowth, but
    I'm too confused when I try to understand its implementation (code) in weka.
    actually, I need to know what kind of output from every variable of FPGrowth
    in weka for my thesis matters. but sometimes, when I did sys.out.println in
    java program for some variables, the output is not what I expect.

    for example, I did it for "largeItemSets" in order to know which frequent
    patterns has to be mined, why this output is come out?

    main.FPGrowth$FrequentItemSets@75e4fc
    main.FPGrowth$FrequentItemSets@c62c8
    main.FPGrowth$FrequentItemSets@12940b3
    main.FPGrowth$FrequentItemSets@156b6b9
    main.FPGrowth$FrequentItemSets@1f66cff
    main.FPGrowth$FrequentItemSets@16de49c
    main.FPGrowth$FrequentItemSets@1bbf1ca
    main.FPGrowth$FrequentItemSets@1ff0dde
    main.FPGrowth$FrequentItemSets@1901437
    main.FPGrowth$FrequentItemSets@1f6226
    main.FPGrowth$FrequentItemSets@64ea66
    main.FPGrowth$FrequentItemSets@158f9d3

    anybody know what it means? which name of variable that consists of frequent
    pattern exactly?

    I use this data, fill 0.2 for lowerminsup and 0.9 for confidence metric.

    @RELATION user1
    @ATTRIBUTE unknown {0,1}
    @ATTRIBUTE action {0,1}
    @ATTRIBUTE adventure {0,1}
    @ATTRIBUTE animation {0,1}
    @ATTRIBUTE childrens {0,1}
    @ATTRIBUTE comedy {0,1}
    @ATTRIBUTE crime {0,1}
    @ATTRIBUTE documentary {0,1}
    @ATTRIBUTE drama {0,1}
    @ATTRIBUTE fantasy {0,1}
    @ATTRIBUTE film-noir {0,1}
    @ATTRIBUTE horror {0,1}
    @ATTRIBUTE musical {0,1}
    @ATTRIBUTE mystery {0,1}
    @ATTRIBUTE romance {0,1}
    @ATTRIBUTE sci-fi {0,1}
    @ATTRIBUTE thriller {0,1}
    @ATTRIBUTE war {0,1}
    @ATTRIBUTE western {0,1}
    @DATA
    0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0
    0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
    0,1,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0
    0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0

    thanks for your help.

  2. #2
    Join Date
    Aug 2006
    Posts
    1,089

    Default

    FrequentItemSets does not have a toString() method. It does have an iterator() method that returns an Iterator<FrequentBinaryItemSet> over the collection of frequent item sets. FrequentBinaryItemSet has a toString() method that prints out a textual description of the item set.

    Cheers,
    Mark.

  3. #3
    Join Date
    May 2012
    Posts
    3

    Default

    can you kindly help me explain how to print the frequent item sets out?
    I'm not a programmer. so I cant understand the code easily
    I tried to do this

    public Iterator<FrequentBinaryItemSet> iterator()
    {
    System.out.println(m_sets.iterator());
    return m_sets.iterator();
    }
    but it printed this out

    java.util.AbstractList$Itr@4aa0ce
    java.util.AbstractList$Itr@1833eca
    java.util.AbstractList$Itr@18f5824
    java.util.AbstractList$Itr@1e3cd51
    java.util.AbstractList$Itr@bc8e1e
    java.util.AbstractList$Itr@11671b2
    java.util.AbstractList$Itr@82764b
    java.util.AbstractList$Itr@12452e8
    how can I know the frequent item sets inside? it's not able to be printed out or what?
    please help, it makes me so depressed.
    thank you.
    Last edited by elisya; 05-18-2012 at 01:58 PM.

  4. #4
    Join Date
    Aug 2006
    Posts
    1,089

    Default

    for (FrequentBinaryItemSet set : m_sets) {
    System.out.println(set);
    }

    Cheers,
    Mark.

  5. #5
    Join Date
    May 2012
    Posts
    3

    Default

    Quote Originally Posted by Mark View Post
    for (FrequentBinaryItemSet set : m_sets) {
    System.out.println(set);
    }

    Cheers,
    Mark.
    do you mean this code?
    for (FrequentBinaryItemSet i : m_sets)
    I dont find 'set' but 'i'.
    but its not print anything out when I type

    for (FrequentBinaryItemSet i : m_sets){
    System.out.println(i);
    }
    how to solve this? please reply.
    thank you so much.

  6. #6
    Join Date
    Aug 2006
    Posts
    1,089

    Default

    It seems that I'm answering too many questions here and on the mailing list too quickly :-) Actually, FrequentItemSets does have a toString() method but it takes an integer argument (the maximum number of item sets to display). Try putting this in your code:

    System.out.println(m_largeItemSets.toString(50000));

    Cheers,
    Mark.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •