public class Itemset
extends java.lang.Object
This class lets to manipulate itemsets
Constructor and Description |
---|
Itemset(int[] values,
int tam,
int lastp)
Constructor for creating a Itemset object
|
Modifier and Type | Method and Description |
---|---|
Itemset |
combine(Itemset itemset2)
It combines two itemsets to get a new itemset based on the creation rules of A priori algorithm
|
boolean |
equalsTo(Itemset itemset2)
It checks if the itemset given is equals to this itemset
|
int[] |
getItems()
It returns the items array of this itemset
|
double |
getSupport()
It returns the support of this itemset
|
boolean |
into(int[] example)
It checks if the example given follows the patron of the itemset
|
void |
print()
It prints the itemset
|
void |
setSupport(double sup)
It sets the support of this itemset
|
int |
size()
It returns the size (number of different attributes) of this itemset
|
public Itemset(int[] values, int tam, int lastp)
Constructor for creating a Itemset object
values
- array of values for the Itemsettam
- number of attributeslastp
- last index of a valid itempublic Itemset combine(Itemset itemset2)
It combines two itemsets to get a new itemset based on the creation rules of A priori algorithm
itemset2
- the other itemsetpublic boolean into(int[] example)
It checks if the example given follows the patron of the itemset
example
- an instancepublic boolean equalsTo(Itemset itemset2)
It checks if the itemset given is equals to this itemset
itemset2
- second itemsetpublic int[] getItems()
It returns the items array of this itemset
public int size()
It returns the size (number of different attributes) of this itemset
public double getSupport()
It returns the support of this itemset
public void setSupport(double sup)
It sets the support of this itemset
sup
- the new supportpublic void print()
It prints the itemset