public class Itemset
extends java.lang.Object
Constructor and Description |
---|
Itemset()
Default Constructor
|
Itemset(int clas,
double MS)
Parameters Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(Item item)
Function to add an item to our itemset
|
void |
calculateSupports(myDataset train)
It computes the support, rule support, hits, misses and PER of our itemset for a given dataset
|
Itemset |
clone()
Clone function
|
Item |
get(int pos)
It returns the item located in the given position of the itemset
|
int |
getClas()
It returns the output class of the itemset
|
double |
getSupport()
It returns the support of the antecedent of the itemset
|
double |
getSupportClass()
It returns the support of the itemset for its related output class
|
boolean |
isEqual(Itemset a)
Function to check if an itemset is equal to another given
|
Item |
remove(int pos)
Function to remove the item located in the given position
|
void |
setMS(double value)
It sets the cut threshold
|
int |
size()
It returns the size of the itemset (the number of items it has)
|
public Itemset()
Default Constructor
public Itemset(int clas, double MS)
Parameters Constructor
clas
- Associated output of the ItemsetMS
- Cut thresholdpublic Itemset clone()
Clone function
clone
in class java.lang.Object
public void add(Item item)
Function to add an item to our itemset
item
- Element to be addedpublic Item get(int pos)
It returns the item located in the given position of the itemset
pos
- Position of the requested item into the itemsetpublic Item remove(int pos)
Function to remove the item located in the given position
pos
- Position of the requested item into the itemsetpublic int size()
It returns the size of the itemset (the number of items it has)
public double getSupport()
It returns the support of the antecedent of the itemset
public double getSupportClass()
It returns the support of the itemset for its related output class
public int getClas()
It returns the output class of the itemset
public void setMS(double value)
It sets the cut threshold
value
- Value to set the cut threshold (MS)public boolean isEqual(Itemset a)
Function to check if an itemset is equal to another given
a
- Itemset to compare with ourspublic void calculateSupports(myDataset train)
It computes the support, rule support, hits, misses and PER of our itemset for a given dataset
train
- Given training dataset to be able to calculate supports