public class Itemset
extends java.lang.Object
Constructor and Description |
---|
Itemset()
Default Constructor
|
Itemset(int clas)
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 |
setClas(int clas)
Function which sets the itemset's output class
|
int |
size()
It returns the size of the itemset (the number of items it has)
|
public Itemset()
Default Constructor
public Itemset(int clas)
Parameters Constructor
clas
- int Associated output of the Itemsetpublic Itemset clone()
Clone function
clone
in class java.lang.Object
public void add(Item item)
Function to add an item to our itemset
item
- Item Element to be addedpublic Item get(int pos)
It returns the item located in the given position of the itemset
pos
- int Position of the requested item into the itemsetpublic Item remove(int pos)
Function to remove the item located in the given position
pos
- int 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 setClas(int clas)
Function which sets the itemset's output class
clas
- int Itemset's output classpublic boolean isEqual(Itemset a)
Function to check if an itemset is equal to another given
a
- Itemset 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