/** * 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); }
/** Function to print the tree. */ public String toString() { return root.toString(); }
/** * 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); }