Esempio n. 1
0
  /**
   * Generates the tree.
   *
   * @param itemsets The dataset used to build the tree.
   * @throws Exception If the tree cannot be built.
   */
  public void generateTree(Dataset itemsets) throws Exception {
    SelectCut selectCut;

    selectCut = new SelectCut(minItemsets, itemsets);
    root = new Tree(selectCut, prune, confidence);
    root.buildTree(itemsets);
  }
Esempio n. 2
0
 /** Function to print the tree. */
 public String toString() {
   return root.toString();
 }
Esempio n. 3
0
 /**
  * Returns class probabilities for an itemset.
  *
  * @param itemset The itemset.
  * @throws Exception If cannot compute the classification.
  */
 public final double[] classificationForItemset(Itemset itemset) throws Exception {
   return root.classificationForItemset(itemset);
 }