javax.datamining.association
Interface RulesFilter


public interface RulesFilter

The interface RulesFilter provides the specification for a rules filter to be used for retrieval of the rules that satisfies the specified conditions.

Author:
JSR-73 Java Data Mining Expert Group

Method Summary
 java.lang.Object[] getItems(RuleComponentOption componentOption, boolean included)
          Returns the items to be included in the component of the rules to be selected.
 int getMaxNumberOfRules()
          Returns the maximum number of rules for the result.
 java.lang.Double getMaxValue(RuleProperty type)
          Returns the maximum value of the range for the specified rule property.
 java.lang.Double getMinValue(RuleProperty type)
          Returns the minimum value for the specified rule property.
 SortOrder getOrderingCondition(RuleProperty orderBy)
          Returns the sorting order of the ordering condition for the rules after they are filtered.
 RuleProperty[] getOrderingConditions()
          Returns an array of the ordering conditions for the rules after they are filtered.
 ComparisonOperator getThresholdOperator(RuleProperty property)
          Returns the threshold comparison operator associated with the specified rule property.
 java.lang.Double getThresholdValue(RuleProperty property)
          Returns the threshold value associated with the specified rule property.
 void setItems(java.lang.Object[] itemArray, RuleComponentOption componentOption, boolean included)
          Sets the items to be included in the specified component of the rules to be selected.
 void setMaxNumberOfRules(int maxRules)
          Sets the maximum number of rules for the result.
 void setOrderingCondition(RuleProperty[] orderByArray, SortOrder[] sortOrderArray)
          Sets the ordering condition for the rules after they are filtered.
 void setRange(RuleProperty type, double minValue, double maxValue)
          Sets a range of the specified rule property.
 void setThreshold(RuleProperty property, ComparisonOperator compOp, double thresholdValue)
          Sets a threshold value with a comparison operator.
 

Method Detail

getItems

public java.lang.Object[] getItems(RuleComponentOption componentOption,
                                   boolean included)
Returns the items to be included in the component of the rules to be selected. Each of these items must appear in the rules to be retrieved.

Parameters:
componentOption -
included -
Returns:
Object[]

getMaxNumberOfRules

public int getMaxNumberOfRules()
Returns the maximum number of rules for the result.

Returns:
int

getMaxValue

public java.lang.Double getMaxValue(RuleProperty type)
Returns the maximum value of the range for the specified rule property. This method can return null if setRange has not been invoked.

Parameters:
type - The type of rule property whose maximum value is to be returned.
Returns:
Double

getMinValue

public java.lang.Double getMinValue(RuleProperty type)
Returns the minimum value for the specified rule property. This method can return null if setRange has not been invoked.

Parameters:
type - The type of rule property whose minimum value is to be returned,
Returns:
Double

getOrderingCondition

public SortOrder getOrderingCondition(RuleProperty orderBy)
Returns the sorting order of the ordering condition for the rules after they are filtered.

Parameters:
orderBy - The ordering condition whose sorting order is to be returned.
Returns:
SortOrder

getOrderingConditions

public RuleProperty[] getOrderingConditions()
Returns an array of the ordering conditions for the rules after they are filtered. The order in the array is the order of ordering conditions to be applied.

Returns:
RuleProperty[]

getThresholdOperator

public ComparisonOperator getThresholdOperator(RuleProperty property)
Returns the threshold comparison operator associated with the specified rule property. Returns null if no threshold value and its comparison operator have been specified with the rule property.

Parameters:
property -
Returns:
ComparisonOperator

getThresholdValue

public java.lang.Double getThresholdValue(RuleProperty property)
Returns the threshold value associated with the specified rule property. Returns null if no threshold value has been specified with the rule property.

Parameters:
property -
Returns:
Double

setItems

public void setItems(java.lang.Object[] itemArray,
                     RuleComponentOption componentOption,
                     boolean included)
Sets the items to be included in the specified component of the rules to be selected. The items being set must be unique among all items, including the excluded items. The items replace the previously specified items, if any.

If included is false, the specified itemset is to be excluded.

Parameters:
itemArray -
componentOption - A component of the rules to be considered for selection.
included - A flag to indicate whether the specified itemset is to be included (if true) or excluded (if false).
Returns:
void

setMaxNumberOfRules

public void setMaxNumberOfRules(int maxRules)
Sets the maximum number of rules for the result. The maximum rules must be a positive integer.

Parameters:
maxRules - The maximum number of rules.
Returns:
void

setOrderingCondition

public void setOrderingCondition(RuleProperty[] orderByArray,
                                 SortOrder[] sortOrderArray)
Sets the ordering condition for the rules after they are filtered. The two arrays must have the same size, and pairing of rule property and sort order is mapped with the elements at the same index.

Parameters:
orderByArray - An array of the rule properties by which filtered rules are ordered.
sortOrderArray - An array of the sorting orders.
Returns:
void

setRange

public void setRange(RuleProperty type,
                     double minValue,
                     double maxValue)
Sets a range of the specified rule property.

The parameter RuleProperty cannot be null, The minimum and maximum values cannot be negative or min > max.

Parameters:
type - The type of rule property for the range to be set.
minValue - The minimum value of the range.
maxValue - The maximum value of the range.
Returns:
void

setThreshold

public void setThreshold(RuleProperty property,
                         ComparisonOperator compOp,
                         double thresholdValue)
Sets a threshold value with a comparison operator.

The parameters property and compOp cannot be null.

This method is used exclusively with setRange method. A rule property that has already been used for range is nullified if used again with setThreshold method.

Parameters:
property -
compOp -
thresholdValue -
Returns:
void