DecisionRule: R6 class representing a decision rule.

Description Details Public fields Methods

Description

A decision rule is an implication extracted from an information table.

Details

A decision rule is made up of a complex condition and class assignments. For STAT1 type of rules the conditions are lower bounds, and assignment goes to an upward class union. For STAT2 type of rules the conditions are upper bounds, and assignment goes to a downward class union.

Public fields

condition

the left-hand side of the implication - a complex condition

t

the right-hand side of the implication - t-parameter of class union(s)

type

the right-hand side of the implication - (class union or union of classes)

Methods

Public methods


Method new()

Create a new DecisionRule object.

Usage
DecisionRule$new(condition, t, type)
Arguments
condition

the complex condition

t

the t-parameter of the class union(s)

type

the type of the rule


Method isMinimal()

Method to decide if this decision rule is minimal among the provided set of rules.

Usage
DecisionRule$isMinimal(it, rules)
Arguments
it

the information table to use

rules

the set of rules to check the minimality in

Returns

a boolean value


Method isWeaker()

Method to decide if this decision rule is a weaker implication compared to the provided rule.

Usage
DecisionRule$isWeaker(it, rule)
Arguments
it

the information table to use

rule

the rule to compare to

Returns

a boolean value


Method ruleMetrics()

Method to calculate rule support, certainty, coverage, and strength

Usage
DecisionRule$ruleMetrics(it)
Arguments
it

the information table to use

Returns

a named list of integers


Method print()

print method.

Usage
DecisionRule$print()

Method getRHS_String()

toString method for the RHS of the rule.

Usage
DecisionRule$getRHS_String()

Method toList()

Method to convert this decision rule to a list, which can be merged into a dataframe for a list of decision rules.

Usage
DecisionRule$toList(it)
Arguments
it

the information table to use

Returns

a named list with the LHS, RHS, and the metrics of this rule


Method toString()

toString method.

Usage
DecisionRule$toString()

Method equals()

Method to compare two DecisionRules

Usage
DecisionRule$equals(other)
Arguments
other

the other decision rule to compare to

Returns

a single boolean value


Method clone()

The objects of this class are cloneable with this method.

Usage
DecisionRule$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


jaspeir/NIJ_Tabitha documentation built on June 3, 2020, 12:38 a.m.