/* -------------------------------------------------------------------------- */ /* */ /* W E I G H T E D A P R I O R I T */ /* */ /* Frans Coenen */ /* */ /* Tuesday 9 September 2008 */ /* */ /* Department of Computer Science */ /* The University of Liverpool */ /* */ /* -------------------------------------------------------------------------- */ /** Class that contains methods to support Weighted Association Rule Mining (WARM) based in the Apriori-T algorithm. */ /* Structure: AssocRuleMining | +-- TotalSupportTree | +-- FuzzyAprioriT | +-- WeightedAprioriT */ //package lucsKDD_ARM; // Java packages import java.io.*; import java.util.*; // Java GUI packages import javax.swing.*; public class WeightedAprioriT extends FuzzyAprioriT { /*------------------------------------------------------------------------*/ /* */ /* FIELDS */ /* */ /*------------------------------------------------------------------------*/ /** 2-D aray to hold input data from data file.
First index is row (record or
TID) number starting from 0, and second is attribute (column) number starting from
zero. */
protected short[][] dataArray = null;
/** Weightings array. */
private double[] weightings = null;
/** Number of weighting values, */
private int numWeightings = 0;
/*---------------------------------------------------------------------*/
/* */
/* CONSTRUCTORS */
/* */
/*---------------------------------------------------------------------*/
/** With argument from existing instance of class AssocRuleMining.
@param newInstance the given instance of the AssocRuleMining
class. */
public WeightedAprioriT(FWARMaprioriT newInstance) {
super(newInstance);
weightings = newInstance.weightings;
numWeightings = newInstance.numWeightings;
// Create data item
int dataLength = newInstance.dataArray.length;
dataArray = new short[dataLength][];
// copy
for (int index1=0;index1