Class ARule
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<ARule>
- Since:
- 2004.07.06
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]
the antecedent/body of the association ruleprotected int
the comparison direction for sorting association rulesprotected double
the value of the additional rule evaluation measureprotected int
the consequent/head of the association ruleprotected util.IdMap
the underlying item baseprotected int
the (absolute) base support (support of the empty pattern, transaction database size)protected int
the (absolute) support of the body set of the association ruleprotected int
the (absolute) support of the head item of the association ruleprotected int
the (absolute) support of the item pattern of the association ruleprotected int
the number of items in the antecedent/bodyprotected double
the value for sorting association rules -
Constructor Summary
ConstructorsConstructorDescriptionARule()
Create an empty association rule.ARule
(util.IdMap ibase) Create an empty association rule.ARule
(util.IdMap ibase, int[] body, int head, int s_body, int s_pat, int s_head, int s_base, double eval) Create an association rule from a head item and a body array.ARule
(util.IdMap ibase, int[] body, int cnt, int head, int s_body, int s_pat, int s_head, int s_base, double eval) Create an association rule from a head item and a body array. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
addItem
(int item) Add an item (given by its identifier) to the body/antecedent of the association rule.final int
Add an item (given by its object) to the body/antecedent of the association rule.final int
Add an item (given by its name) to the body/antecedent of the association rule.final int
addItemById
(int item) Add an item (given by its identifier) to the body/antecedent of the association rule.final int
addItemByName
(String item) Add an item (given by its name) to the body/antecedent of the association rule.final int
addItemByObject
(Object item) Add an item (given by its object) to the body/antecedent of the association rule.final int
Compare this rule to another (given as argument) by comparing body items lexicographically.final boolean
bodyContains
(ARule rule) Whether this rule's body (antecdent) contains another rule's body (antecedent).final boolean
bodyEquals
(int[] items) Compare the rule's body to a given item pattern.final boolean
bodyEquals
(int[] items, int cnt) Compare the rule's body to a given item pattern.final boolean
bodyIsContainedIn
(ARule rule) Whether this rule's body (antecedent) is contained in another rule's body (antecedent).final boolean
bodyIsSubOf
(int[] items) Whether this rule's body (antecedent) is a subpattern of a given item pattern.final boolean
bodyIsSubOf
(int[] items, int cnt) Whether this rule's body (antecedent) is a subpattern of a given item pattern.final boolean
bodyIsSubOf
(ARule rule) Whether this rule's body (antecedent) is a subpattern of another rule's body (antecedent).final boolean
bodyIsSuperOf
(int[] items) Whether this rule's body (antecedent) is a superpattern of a given item pattern.final boolean
bodyIsSuperOf
(int[] items, int cnt) Whether this rule's body (antecedent) is a superpattern of a given item pattern.final boolean
bodyIsSuperOf
(ARule rule) Whether this rule's body (antecdent) is a superpattern of another rule's body (antecedent).final Object
clone()
Clone this association rule (the item base is maintained, the body array is copied).final Object
clone
(boolean iclone) Clone this association rule.final Object
clone
(boolean iclone, util.IdMap ibase) Clone this association rule.final Object
clone
(util.IdMap ibase) Clone this association rule (the body array is copied).clone
(util.IdMap ibase, boolean iclone) Clone this association rule.final int
Compare this rule to another (given as argument).final boolean
Compare an association rule to another (given as argument).boolean
Compare an association rule to another (given as argument).final int
Get the (absolute) support of the body of the association rule.final int
Get the (absolute) support of the head of the association rule.final int
Get the (absolute) support of the item set of the association rule.final int[]
Get the item array (length fits only after packing).final int
Get the (absolute) support of the empty set (i.e.final int[]
getBody()
Get the item array (length fits only after packing).final int
getBody
(int i) Get the identifier of an antecedent item.final int
getBodyItem
(int i) Get the identifier of an antecedent item.final String
getBodyItemName
(int i) Get the name of an antecedent item.final Object
getBodyItemObject
(int i) Get the object of an antecedent item.final String
getBodyName
(int i) Get the name of an antecedent item.final Object
getBodyObject
(int i) Get the object of an antecedent item.final int
Get the size of the antecedent (number of items).final int
Get the (absolute) support of the body of the association rule.final double
getConf()
Get the confidence of the association rule.final double
getEval()
Get the value of the additional rule evaluation measure.final int
getHead()
Get the identifier of the consequent item.final String
Get the name of the consequent item.Get the object of the consequent item.final String
Get the name of the consequent item.final Object
Get the object of the consequent item.final int
Get the size of the consequent of the rule (either 0 or 1).final int
Get the (absolute) support of the head of the association rule.final int
Get the identifier of the last antecedent item.final int
Get the identifier of the last antecedent item.final double
getLift()
Get the lift value of the association rule.final double
Get the (relative) support of the body of the association rule.final double
Get the (relative) support of the head of the association rule.final double
Get the (relative) support of the item set of the association rule.final int
getSize()
Get the size of the rule (total number of items).final int
getSupp()
Get the (absolute) support of the item set underlying the association rule.final int
headAllCmpTo
(ARule rule) Compare this rule to another (given as argument) by comparing all head properties: items, support values etc.final int
Compare this rule to another (given as argument) by comparing head items lexicographically.final int
itemsAllCmpTo
(ARule rule) Compare this rule to another (given as argument) by comparing all body and head properties: items, support values etc.final int
itemsCmpTo
(ARule rule) Compare this rule to another (given as argument) by comparing body and head items lexicographically.final void
pack()
Pack an association rule, i.e., optimize memory usage.static ARule
parse
(util.IdMap ibase, InputStream in) Parse an association rule.static ARule
Parse an association rule.static ARule
Parse an association rule.static ARule
parse
(util.IdMap ibase, util.Scanner scan) Parse an association rule.final void
recode
(util.IdMap ibase, int[] map) Recode an association rule set to another item base, replacing the item base.final void
setSort
(double value, int dir) Set sort value and sort direction.final void
setSort
(int value, int dir) Set sort value and sort direction.final void
sort()
Sort the items in the rule body (antecedent).final String
toString()
Create a string description.final String
Create a string description.Create a string description.final void
Write an association rule.final void
Write an association rule.final void
Write an association rule.
-
Field Details
-
ibase
protected util.IdMap ibasethe underlying item base -
body
protected int[] bodythe antecedent/body of the association rule -
size
protected int sizethe number of items in the antecedent/body -
head
protected int headthe consequent/head of the association rule -
s_pat
protected int s_patthe (absolute) support of the item pattern of the association rule -
s_body
protected int s_bodythe (absolute) support of the body set of the association rule -
s_head
protected int s_headthe (absolute) support of the head item of the association rule -
s_base
protected int s_basethe (absolute) base support (support of the empty pattern, transaction database size) -
eval
protected double evalthe value of the additional rule evaluation measure -
sort
protected double sortthe value for sorting association rules -
dir
protected int dirthe comparison direction for sorting association rules
-
-
Constructor Details
-
ARule
public ARule()Create an empty association rule.- Since:
- 2007.03.12 (Christian Borgelt)
-
ARule
public ARule(util.IdMap ibase) Create an empty association rule.- Parameters:
ibase
- the underlying item base- Since:
- 2007.03.12 (Christian Borgelt)
-
ARule
public ARule(util.IdMap ibase, int[] body, int head, int s_body, int s_pat, int s_head, int s_base, double eval) Create an association rule from a head item and a body array.- Parameters:
ibase
- the underlying item basebody
- the items in the body of the associaton rulehead
- the item in the head of the associaton rules_body
- the absolute support of the rule bodys_pat
- the absolute support of the underlying item sets_head
- the absolute support of the rule heads_base
- the absolute support of the empty seteval
- the evaluation of the association rule- Since:
- 2014.10.23 (Christian Borgelt)
-
ARule
public ARule(util.IdMap ibase, int[] body, int cnt, int head, int s_body, int s_pat, int s_head, int s_base, double eval) Create an association rule from a head item and a body array.- Parameters:
ibase
- the underlying item basebody
- the items in the body of the associaton rulecnt
- the number of items in the rule bodyhead
- the item in the head of the associaton rules_body
- the absolute support of the rule bodys_pat
- the absolute support of the underlying item sets_head
- the absolute support of the rule heads_base
- the absolute support of the empty seteval
- the evaluation of the association rule- Since:
- 2014.10.23 (Christian Borgelt)
-
-
Method Details
-
clone
Clone this association rule (the item base is maintained, the body array is copied). -
clone
Clone this association rule (the body array is copied).- Parameters:
ibase
- the item base to use for the clone- Returns:
- a clone of this association rule
- Since:
- 2017.06.20 (Christian Borgelt)
-
clone
Clone this association rule.- Parameters:
iclone
- whether to clone the body item array- Returns:
- a clone of this association rule
- Since:
- 2017.06.20 (Christian Borgelt)
-
clone
Clone this association rule.- Parameters:
iclone
- whether to clone the body item arrayibase
- the item base to use for the clone; ifnull
, keep old item base- Returns:
- a clone of this association rule
- Since:
- 2017.06.20 (Christian Borgelt)
-
clone
Clone this association rule.- Parameters:
ibase
- the item base to use for the clone; ifnull
, keep old item baseiclone
- whether to clone the body item array- Returns:
- a clone of this association rule
- Since:
- 2017.06.20 (Christian Borgelt)
-
addItemById
public final int addItemById(int item) Add an item (given by its identifier) to the body/antecedent of the association rule.- Parameters:
item
- the item identifier- Returns:
- the index of the new item (in the rule body)
- Since:
- 2017.06.29 (Christian Borgelt)
-
addItemByName
Add an item (given by its name) to the body/antecedent of the association rule.- Parameters:
item
- the name of the item to add- Returns:
- the index of the new item (in the rule body)
- Since:
- 2017.06.29 (Christian Borgelt)
-
addItemByObject
Add an item (given by its object) to the body/antecedent of the association rule.- Parameters:
item
- the object of the item to add- Returns:
- the index of the new item (in the rule body)
- Since:
- 2017.06.29 (Christian Borgelt)
-
addItem
public final int addItem(int item) Add an item (given by its identifier) to the body/antecedent of the association rule.- Parameters:
item
- the identifier of the item to add- Returns:
- the index of the new item (in the rule body)
- Since:
- 2017.06.29 (Christian Borgelt)
-
addItem
Add an item (given by its name) to the body/antecedent of the association rule.- Parameters:
item
- the name of the item to add- Returns:
- the index of the new item (in the rule body)
- Since:
- 2017.06.29 (Christian Borgelt)
-
addItem
Add an item (given by its object) to the body/antecedent of the association rule.- Parameters:
item
- the object of the item to add- Returns:
- the index of the new item (in the rule body)
- Since:
- 2017.06.29 (Christian Borgelt)
-
getBody
public final int getBody(int i) Get the identifier of an antecedent item.- Parameters:
i
- the index of the antecedent item- Returns:
- the identifier of the antecedent item with index i
- Since:
- 2014.10.03 (Christian Borgelt)
-
getBodyItem
public final int getBodyItem(int i) Get the identifier of an antecedent item.- Parameters:
i
- the index of the antecedent item- Returns:
- the identifier of the antecedent item with index i
- Since:
- 2017.06.20 (Christian Borgelt)
-
getLastBody
public final int getLastBody()Get the identifier of the last antecedent item.- Returns:
- the identifier of the last antecedent item
- Since:
- 2017.06.20 (Christian Borgelt)
-
getLastBodyItem
public final int getLastBodyItem()Get the identifier of the last antecedent item.- Returns:
- the identifier of the last antecedent item
- Since:
- 2017.06.20 (Christian Borgelt)
-
getBodyName
Get the name of an antecedent item.- Parameters:
i
- the index of the antecedent item- Returns:
- the name of the antecedent item with index i
- Since:
- 2005.07.06 (Christian Borgelt)
-
getBodyItemName
Get the name of an antecedent item.- Parameters:
i
- the index of the antecedent item- Returns:
- the name of the antecedent item with index i
- Since:
- 2017.06.20 (Christian Borgelt)
-
getBodyObject
Get the object of an antecedent item.- Parameters:
i
- the index of the antecedent item- Returns:
- the object of the antecedent item with index i
- Since:
- 2017.06.20 (Christian Borgelt)
-
getBodyItemObject
Get the object of an antecedent item.- Parameters:
i
- the index of the antecedent item- Returns:
- the name of the antecedent item with index i
- Since:
- 2017.06.20 (Christian Borgelt)
-
getBody
public final int[] getBody()Get the item array (length fits only after packing).- Returns:
- the array of body items
- Since:
- 2014.10.03 (Christian Borgelt)
-
getAllBodyItems
public final int[] getAllBodyItems()Get the item array (length fits only after packing).- Returns:
- the array of body items
- Since:
- 2017.06.20 (Christian Borgelt)
-
getSize
public final int getSize()Get the size of the rule (total number of items).- Returns:
- the size of the rule
- Since:
- 2007.03.12 (Christian Borgelt)
-
getBodySize
public final int getBodySize()Get the size of the antecedent (number of items).- Returns:
- the size of the antecedent
- Since:
- 2005.07.06 (Christian Borgelt)
-
getHeadSize
public final int getHeadSize()Get the size of the consequent of the rule (either 0 or 1).- Returns:
- the size of the consequent of the rule
- Since:
- 2017.06.20 (Christian Borgelt)
-
getHead
public final int getHead()Get the identifier of the consequent item.- Returns:
- the identifier of the consequent item
- Since:
- 2014.10.03 (Christian Borgelt)
-
getHeadName
Get the name of the consequent item.- Returns:
- the name of the consequent item
- Since:
- 2005.07.06 (Christian Borgelt)
-
getHeadItemName
Get the name of the consequent item.- Returns:
- the name of the consequent item
- Since:
- 2017.06.20 (Christian Borgelt)
-
getHeadObject
Get the object of the consequent item.- Returns:
- the object of the consequent item
- Since:
- 2017.06.20 (Christian Borgelt)
-
getHeadItemObject
Get the object of the consequent item.- Returns:
- the object of the consequent item
- Since:
- 2017.06.20 (Christian Borgelt)
-
getSupp
public final int getSupp()Get the (absolute) support of the item set underlying the association rule.- Returns:
- the (absolute) support of the item set underlying the association rule
- Since:
- 2005.07.06 (Christian Borgelt)
-
getAbsSupp
public final int getAbsSupp()Get the (absolute) support of the item set of the association rule.- Returns:
- the (absolute) support of the item set of the association rule
- Since:
- 2005.07.06 (Christian Borgelt)
-
getRelSupp
public final double getRelSupp()Get the (relative) support of the item set of the association rule.- Returns:
- the (relative) support of the item set of the association rule
- Since:
- 2005.07.06 (Christian Borgelt)
-
getBodySupp
public final int getBodySupp()Get the (absolute) support of the body of the association rule.- Returns:
- the (absolute) support of the body of the association rule
- Since:
- 2008.11.03 (Christian Borgelt)
-
getAbsBodySupp
public final int getAbsBodySupp()Get the (absolute) support of the body of the association rule.- Returns:
- the (absolute) support of the body of the association rule
- Since:
- 2008.11.03 (Christian Borgelt)
-
getRelBodySupp
public final double getRelBodySupp()Get the (relative) support of the body of the association rule.- Returns:
- the (relative) support of the body of the association rule
- Since:
- 2008.11.03 (Christian Borgelt)
-
getHeadSupp
public final int getHeadSupp()Get the (absolute) support of the head of the association rule.- Returns:
- the (absolute) support of the head of the association rule
- Since:
- 2014.10.02 (Christian Borgelt)
-
getAbsHeadSupp
public final int getAbsHeadSupp()Get the (absolute) support of the head of the association rule.- Returns:
- the (absolute) support of the head of the association rule
- Since:
- 2014.10.02 (Christian Borgelt)
-
getRelHeadSupp
public final double getRelHeadSupp()Get the (relative) support of the head of the association rule.- Returns:
- the (relative) support of the head of the association rule
- Since:
- 2014.10.02 (Christian Borgelt)
-
getBaseSupp
public final int getBaseSupp()Get the (absolute) support of the empty set (i.e. the size of the transaction database).- Returns:
- the (absolute) support of the empty set
- Since:
- 2016.04.08 (Christian Borgelt)
-
getConf
public final double getConf()Get the confidence of the association rule.- Returns:
- the confidence of the association rule
- Since:
- 2005.07.06 (Christian Borgelt)
-
getLift
public final double getLift()Get the lift value of the association rule.- Returns:
- the lift value of the association rule
- Since:
- 2005.07.06 (Christian Borgelt)
-
getEval
public final double getEval()Get the value of the additional rule evaluation measure.- Returns:
- the value of the additional rule evaluation measure
- Since:
- 2005.07.06 (Christian Borgelt)
-
sort
public final void sort()Sort the items in the rule body (antecedent).- Since:
- 2017.06.20 (Christian Borgelt)
-
setSort
public final void setSort(int value, int dir) Set sort value and sort direction.- Parameters:
value
- the value to sort association rules ondir
- the direction to sort association rules into- Since:
- 2016.04.10 (Christian Borgelt)
-
setSort
public final void setSort(double value, int dir) Set sort value and sort direction.- Parameters:
value
- the value to sort association rules ondir
- the direction to sort association rules into- Since:
- 2016.04.10 (Christian Borgelt)
-
compareTo
Compare this rule to another (given as argument).- Specified by:
compareTo
in interfaceComparable<ARule>
- Parameters:
rule
- the rule to compare to- Returns:
-1
,0
, or+1
as the sort value of this rule is less than, equal to, or greater than the sort value of the given rule- Since:
- 2016.04.10 (Christian Borgelt)
-
bodyCmpTo
Compare this rule to another (given as argument) by comparing body items lexicographically.- Parameters:
rule
- the rule to compare to- Returns:
-1
,0
, or+1
as this rule is less than, equal to, or greater than the rule given as an argument- Since:
- 2016.06.20 (Christian Borgelt)
-
headCmpTo
Compare this rule to another (given as argument) by comparing head items lexicographically.- Parameters:
rule
- the rule to compare to- Returns:
-2
,0
, or+2
as this rule is less than, equal to, or greater than the rule given as an argument- Since:
- 2016.06.29 (Christian Borgelt)
-
itemsCmpTo
Compare this rule to another (given as argument) by comparing body and head items lexicographically.- Parameters:
rule
- the rule to compare to- Returns:
-1
or+1
if the two rules differ in their antecedent/body;-2
or+2
if the two rules have the same antecedent/body, but differ in their consequent/head; and0
if the two rules coincide in all items; the function returns a negative value,0
, or a positive value as this rule is less than, equal to, or greater than the rule given as an argument- Since:
- 2016.06.20 (Christian Borgelt)
-
headAllCmpTo
Compare this rule to another (given as argument) by comparing all head properties: items, support values etc.- Parameters:
rule
- the rule to compare to- Returns:
-2
or+2
if the two rules differ in their consequent/head;-3
or+3
if the two rules have the same consequents/heads, but differ in their support values; and0
if the two rules coincide in all items and in all support values; the function returns a negative value,0
, or a positive value as this rule is less than, equal to, or greater than the rule given as an argument- Since:
- 2016.06.20 (Christian Borgelt)
-
itemsAllCmpTo
Compare this rule to another (given as argument) by comparing all body and head properties: items, support values etc.- Parameters:
rule
- the rule to compare to- Returns:
-1
or+1
if the two rules differ in their antecedent/body;-2
or+2
if the two rules have the same antecedent, but differ in their consequent/head;-3
or+3
if the two rules coincide in their items, but differ in their support values; and0
if the two rules coincide in all items and all support values; the function returns a negative value,0
, or a positive value as this rule is less than, equal to, or greater than the rule given as an argument- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyEquals
public final boolean bodyEquals(int[] items, int cnt) Compare the rule's body to a given item pattern.- Parameters:
items
- the items of the pattern to compare tocnt
- the number of items; if negative, the length of the item array is used- Returns:
- whether the rule's body equals the given item pattern
- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyEquals
public final boolean bodyEquals(int[] items) Compare the rule's body to a given item pattern.- Parameters:
items
- the items of the pattern to compare to- Returns:
- whether the rule's body equals the given item pattern
- Since:
- 2016.06.20 (Christian Borgelt)
-
equals
Compare an association rule to another (given as argument).- Parameters:
rule
- the association rule to compare to- Returns:
true
if the two rules are identical andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
equals
Compare an association rule to another (given as argument).- Parameters:
rule
- the association rule to compare tochksupp
- whether to compare the support values- Returns:
true
if the two rules are identical andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyIsSubOf
public final boolean bodyIsSubOf(int[] items, int cnt) Whether this rule's body (antecedent) is a subpattern of a given item pattern.For item permutations and sequences the function works directly, but for item sets the rule body and the given item array need to be sorted for this function to work.
- Parameters:
items
- the items of the pattern to compare tocnt
- the number of items; if negative, the length of the given item array is used- Returns:
true
if this rule's body (antecedent) is a subpattern of the given item pattern andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyIsSubOf
public final boolean bodyIsSubOf(int[] items) Whether this rule's body (antecedent) is a subpattern of a given item pattern.For item permutations and sequences the function works directly, but for item sets the rule body and the given item array need to be sorted for this function to work.
- Parameters:
items
- the items of the pattern to compare to- Returns:
true
if this rule's body (antecedent) is a subpattern of the given item pattern andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyIsSubOf
Whether this rule's body (antecedent) is a subpattern of another rule's body (antecedent).For item permutations and sequences the function works directly, but for item sets both rule bodies need to be sorted with
sort()
for this function to work.- Parameters:
rule
- the association rule to compare to- Returns:
true
if this rule's body (antecedent) is a subpattern of the body (antecedent) of the given association rulerule
andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyIsContainedIn
Whether this rule's body (antecedent) is contained in another rule's body (antecedent).For item permutations and sequences the function works directly, but for item sets both rule bodies need to be sorted with
sort()
for this function to work.- Parameters:
rule
- the association rule to compare to- Returns:
true
if this rule's body (antecedent) is contained in the body (antecedent) of the given association rulerule
andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyIsSuperOf
public final boolean bodyIsSuperOf(int[] items, int cnt) Whether this rule's body (antecedent) is a superpattern of a given item pattern.For item permutations and sequences the function works directly, but for item sets the rule body and the given item array need to be sorted for this function to work.
- Parameters:
items
- the items of the pattern to compare tocnt
- the number of items; if negative, the length of the given item array is used- Returns:
true
if this rule's body (antecedent) is a superpattern of the given item pattern andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyIsSuperOf
public final boolean bodyIsSuperOf(int[] items) Whether this rule's body (antecedent) is a superpattern of a given item pattern.For item permutations and sequences the function works directly, but for item sets the rule body and the given item array need to be sorted for this function to work.
- Parameters:
items
- the items of the pattern to compare to- Returns:
true
if this rule's body (antecedent) is a superpattern of the given item pattern andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyIsSuperOf
Whether this rule's body (antecdent) is a superpattern of another rule's body (antecedent).For item permutations and sequences the function works directly, but for item sets both rule bodies need to be sorted with
sort()
for this function to work.- Parameters:
rule
- the association rule to compare to- Returns:
true
if this rule's body (antecedent) is a superpattern of the body (antecedent) of the given association rulerule
andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
bodyContains
Whether this rule's body (antecdent) contains another rule's body (antecedent).For item permutations and sequences the function works directly, but for item sets both rule bodies need to be sorted with
sort()
for this function to work.- Parameters:
rule
- the association rule to compare to- Returns:
true
if this rule's body (antecedent) contains the body (antecedent) of the given association rulerule
andfalse
otherwise- Since:
- 2016.06.20 (Christian Borgelt)
-
recode
public final void recode(util.IdMap ibase, int[] map) Recode an association rule set to another item base, replacing the item base.- Parameters:
ibase
- the item base to recode the association rule set tomap
- the old identifier to new identifier map; ifnull
, the map is created by a call toIdMap.getMapTo()
- Since:
- 2016.06.29 (Christian Borgelt)
-
pack
public final void pack()Pack an association rule, i.e., optimize memory usage.- Since:
- 2005.07.06 (Christian Borgelt)
-
write
Write an association rule.- Parameters:
writer
- the writer to write to- Throws:
IOException
- if a write error occurs- Since:
- 2016.04.08 (Christian Borgelt)
-
write
Write an association rule.- Parameters:
writer
- the writer to write toinfo
- the additional information to write- Throws:
IOException
- if a write error occurs- Since:
- 2016.04.08 (Christian Borgelt)
-
write
Write an association rule.- Parameters:
writer
- the writer to write toisep
- the item separatorinfo
- the additional information to write- Throws:
IOException
- if a write error occurs- Since:
- 2016.04.08 (Christian Borgelt)
-
parse
Parse an association rule.- Parameters:
ibase
- the underlying item basescan
- the scanner to read from- Returns:
- the parsed association rule
- Throws:
IOException
- if a read error occurs- Since:
- 2005.07.06 (Christian Borgelt)
-
parse
Parse an association rule.- Parameters:
ibase
- the underlying item basereader
- the reader to read from- Returns:
- the parsed association rule
- Throws:
IOException
- if a read error occurs- Since:
- 2005.07.06 (Christian Borgelt)
-
parse
Parse an association rule.- Parameters:
ibase
- the underlying item basedesc
- the string description to parse- Returns:
- the parsed association rule
- Throws:
IOException
- if a read error occurs- Since:
- 2005.07.06 (Christian Borgelt)
-
parse
Parse an association rule.- Parameters:
ibase
- the underlying item basein
- the input stream to read from- Returns:
- the parsed association rule
- Throws:
IOException
- if a read error occurs- Since:
- 2005.07.06 (Christian Borgelt)
-
toString
Create a string description.- Parameters:
isep
- the separator for the itemsinfo
- the additional rule information to write- Returns:
- the created string description
- Since:
- 2017.06.20 (Christian Borgelt)
-
toString
Create a string description.- Parameters:
addinfo
- the additional rule information to write- Returns:
- the created string description
- Since:
- 2017.06.20 (Christian Borgelt)
-
toString
Create a string description.
-