Package cs412.hw3.item

Examples of cs412.hw3.item.Item


    double hhc = 0;
   
    // traverse all header links for the beginning of this pattern item
    //  and calculate the support
    FPTreeHeader header = t.getHeader();
    FPTree tree = header.getHeaderNodeLink().get(i.getItemName());
    List<FPTree> nodeLinks = tree.getNodeLinks();
    nodeLinks.add(0, tree);
    float patSup = 0;
    for(FPTree fptree : nodeLinks){
      patSup += new Float(getPatternSupport(fptree).intValue()).floatValue();
    }
View Full Code Here


    tDB.addTransaction(t7);
//    System.out.println(tDB.H_C());
//    Pattern p = new Pattern();
//    p.insertItem(new Item("d"));
    FPTreeBuilder b = new FPTreeBuilder(tDB);
    FPTree t = b.buildTree();
//    System.out.println(tDB.H_C_Cond_X(p));
//    System.out.println(tDB.IG(p));
//   
//    DDPMine m = new DDPMine(tDB,1);
//    List<Pattern> results = m.perform(t.getHeader());
//    System.out.println(results);
    Pattern pp = new Pattern();
    pp.insertItem(new Item("d"));
//    pp.insertItem(new Item("b"));
    ConditionalDB d = tDB.getConditionalDBForPattern(pp);
    FPTree tr = d.buildConditionalFPTree();
   
  }
View Full Code Here

   * @param tidList
   */
  private  void update_tree(List<Transaction> tidList) {
    for(Transaction t: tidList){
      if(ctable.isTransactionReadyForRemoval(t)){
        FPTree tree = TIDMapping.getTreeForTransaction(t);
        if(tree != null){
          tree.progressivelyShrinkToRootFromMe();
        }
        myDBRef.removeTransaction(t);
      }
    }
  }
View Full Code Here

      if(maxIG > ig_ub_DB_CARDINALITY){
        //skip mining on Db
      }
      else{
        ConditionalDB cond_db_for_B = myDBRef.getConditionalDBForPattern(B);
        FPTree Pb = cond_db_for_B.buildConditionalFPTree();
        if(Pb.getCount() == P.getCount()){
          System.out.println("skipping an entire branch since support is the same");
        }else{
          branch_and_bound(Pb,s,B);
        }
      }
View Full Code Here

    Log.writeInfoDual(new Date()+" :Processing Transactions...");
    String fileName = args[0];
    r.processFile(fileName);
    Log.writeInfoDual(new Date()+" :Processed Transactions");
    Log.writeInfoDual(new Date()+" :Building FPTree...");
    FPTreeBuilder b = new FPTreeBuilder(db);
    FPTree t = b.buildTree();
    System.out.println(t.getCount());
    Log.writeInfoDual(new Date()+" :FPTree Built");
    Log.writeInfoDual(new Date()+" :Mining Patterns...");
    DDPMine m = new DDPMine(db,delta);
    List<Pattern> results = m.perform(t);
View Full Code Here

    tDB.addTransaction(t6);
    tDB.addTransaction(t7);
//    System.out.println(tDB.H_C());
//    Pattern p = new Pattern();
//    p.insertItem(new Item("d"));
    FPTreeBuilder b = new FPTreeBuilder(tDB);
    FPTree t = b.buildTree();
//    System.out.println(tDB.H_C_Cond_X(p));
//    System.out.println(tDB.IG(p));
//   
//    DDPMine m = new DDPMine(tDB,1);
//    List<Pattern> results = m.perform(t.getHeader());
View Full Code Here

//    Log.writeInfo("IGUB:hc="+hc);
    double hhc = 0;
   
    // traverse all header links for the beginning of this pattern item
    //  and calculate the support
    FPTreeHeader header = t.getHeader();
    FPTree tree = header.getHeaderNodeLink().get(i.getItemName());
    List<FPTree> nodeLinks = tree.getNodeLinks();
    nodeLinks.add(0, tree);
    float patSup = 0;
    for(FPTree fptree : nodeLinks){
      patSup += new Float(getPatternSupport(fptree).intValue()).floatValue();
View Full Code Here

TOP

Related Classes of cs412.hw3.item.Item

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.