|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectarules.ARuleSet
public class ARuleSet
Class for a set of association rules.
Field Summary | |
---|---|
static int |
AREM
sort mode: additional rule evaluation measure |
protected int |
body
the maximal number of items in a rule body |
static int |
BODY
sort mode: body support |
protected int |
cnt
the current number of rules |
static int |
CONF
sort mode: confidence |
protected int |
head
the maximal number of items in a rule head |
static int |
HEAD
sort mode: head of the rule |
protected util.IdMap |
iset
the underlying item set |
static int |
LIFT
sort mode: lift value |
protected arules.ARule[] |
rules
the set of association rules |
static int |
SIZE
sort mode: size / number of items |
static int |
SUPP
sort mode: support |
Constructor Summary | |
---|---|
ARuleSet()
Create an empty set of association rules. |
|
ARuleSet(util.IdMap iset)
Create an empty set of association rules. |
Method Summary | |
---|---|
int |
addRule(arules.ARule rule)
Add an association rule. |
util.IdMap |
getItemSet()
Get the underlying item set. |
int |
getMaxBodySize()
Get the maximal size of a rule body. |
int |
getMaxSize()
Get the maximal size of a rule. |
arules.ARule |
getRule(int i)
Get an association rule |
int |
getRuleCount()
Get the number of association rules. |
static void |
main(java.lang.String[] args)
Main function for testing some basic functionality. |
static ARuleSet |
parseARuleSet(util.IdMap iset,
java.io.Reader reader)
Parse a set of association rules. |
static ARuleSet |
parseARuleSet(util.IdMap iset,
util.Scanner scan)
Parse a set of association rules. |
void |
sort(int field)
Sort the set of association rules. |
void |
write(java.io.Writer writer)
Write a set of association rules. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SIZE
public static final int CONF
public static final int SUPP
public static final int BODY
public static final int LIFT
public static final int AREM
public static final int HEAD
protected util.IdMap iset
protected arules.ARule[] rules
protected int cnt
protected int body
protected int head
Constructor Detail |
---|
public ARuleSet()
public ARuleSet(util.IdMap iset)
iset
- the underlying item setMethod Detail |
---|
public util.IdMap getItemSet()
public int getRuleCount()
public arules.ARule getRule(int i)
i
- the index of the association rule
public int addRule(arules.ARule rule)
rule
- the association rule to add
public int getMaxSize()
public int getMaxBodySize()
public void sort(int field)
field
- the identifier of the field to compare firstpublic void write(java.io.Writer writer) throws java.io.IOException
writer
- the writer to write to
java.io.IOException
- if a write error occurspublic static ARuleSet parseARuleSet(util.IdMap iset, util.Scanner scan) throws java.io.IOException
iset
- the underlying item setscan
- the scanner to read from
java.io.IOException
- if a read error occurspublic static ARuleSet parseARuleSet(util.IdMap iset, java.io.Reader reader) throws java.io.IOException
iset
- the underlying item setreader
- the reader to read from
java.io.IOException
- if a read error occurspublic static void main(java.lang.String[] args)
It is tried to parse the file that is given as the first command line argument as a set of association rules.
args
- the command line arguments
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |