List of usage examples for weka.associations RuleGeneration expectation
public static final double expectation(double ruleCount, int premiseCount, double[] midPoints, Hashtable<Double, Double> priors)
From source file:cba.RuleItem.java
License:Open Source License
/** * Constructor/*from w ww .j a va 2 s . c om*/ * @param premise the premise of the future RuleItem * @param consequence the consequence of the future RuleItem * @param genTime the time of generation of the future RuleItem * @param ruleSupport support of the rule * @param m_midPoints the mid poitns of the intervals * @param m_priors Hashtable containing the estimated prior probablilities */ public RuleItem(ItemSet premise, ItemSet consequence, int genTime, int ruleSupport, double[] m_midPoints, Hashtable m_priors) { m_premise = premise; m_consequence = consequence; m_accuracy = RuleGeneration.expectation((double) ruleSupport, m_premise.m_counter, m_midPoints, m_priors); //overflow, underflow if (Double.isNaN(m_accuracy) || m_accuracy < 0) { m_accuracy = Double.MIN_VALUE; } m_consequence.m_counter = ruleSupport; m_genTime = genTime; }