public class Itemset
extends java.lang.Object
Title: Itemset
Description: This class contains the representation of a itemset
Copyright: Copyright KEEL (c) 2007
Company: KEEL
Constructor and Description |
---|
Itemset()
Default constructor.
|
Itemset(int clas)
Builder
|
Modifier and Type | Method and Description |
---|---|
void |
add(Item item)
Function to add an item to our itemset
|
void |
calculateSupports(DataBase dataBase,
myDataset train)
It computes the support, rule support, hits, misses and PER of our itemset for a given dataset
|
Itemset |
clone()
Clone
|
double |
degree(DataBase dataBase,
double[] ejemplo)
Calculate the degree of the given example inside the given data-set.
|
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)
Set the class with the value given as argument.
|
int |
size()
It returns the size of the itemset (the number of items it has)
|
public Itemset()
public Itemset(int clas)
Builder
clas
- Classpublic Itemset clone()
Clone
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 setClas(int clas)
clas
- class given.public boolean isEqual(Itemset a)
Function to check if an itemset is equal to another given
a
- Itemset to compare with ourspublic void calculateSupports(DataBase dataBase, myDataset train)
It computes the support, rule support, hits, misses and PER of our itemset for a given dataset
dataBase
- Given training dataset useful information to calculate supports.train
- Given training dataset to be able to calculate supports.public double degree(DataBase dataBase, double[] ejemplo)
dataBase
- Given training dataset useful information to calculate the degree.ejemplo
- Given example to calculate its degree.