Learn R Programming

RoughSets (version 1.0-0)

D.discretize.equal.intervals.RST: The "equal interval size" discretization algorithm

Description

It is a function used for computing cuts of the "equal interval size" discretization into $k$ intervals

Usage

D.discretize.equal.intervals.RST(decision.table,
    nOfIntervals = 4, ...)

Arguments

decision.table
a "DecisionTable" class representing the decision table. See SF.asDecisionTable.
nOfIntervals
a numeric value representing the number of interval separating the data.
...
other parameters.

Value

  • A class "Discretization" that contains the following components:
    • cut.values: a list representing cut values of each considered attributes.
    • type.method: the type of method which is used to define cut values.

      In this case, it is"unsupervised.intervals".

    • type.task: the type of task which is"discretization".
    • model: the type of model which is"RST".

Details

This method can be considered an unsupervised discretization method for continuous features since it does not consider the class label. The algorithm starts by sorting the data and then we calculate $\delta$ defined as

$\delta = \frac{x_{max} - x_{min}}{k}$,

where $k$ is a parameter supplied by the user to define how many intervals will be determined and $x_{max}$ and $x_{min}$ are the upper and lower boundary of data. The detailed information can be seen in (J. Dougherty et al, 1995).

It should be noted that the output of this function is a class containing cut values. In order to generate the new decision table, SF.applyDecTable should be executed.

References

J. Dougherty, R. Kohavi, and M. Sahami, "Supervised and Unsupervised Discretization of Continuous Features", In A. Prieditis & S. J. Russell, eds. Work. Morgan Kaufmann, p. 194-202 (1995).

See Also

D.local.discernibility.matrix.RST, D.max.discernibility.matrix.RST,

D.discretize.quantiles.RST, and D.global.discernibility.heuristic.RST

Examples

Run this code
#################################################################
## Example: Determine cut values and generate new decision table
#################################################################
 dt.ex1 <- data.frame(c(1, 1.2, 1.3, 1.4, 1.4, 1.6, 1.3), c(2, 0.5, 3, 1, 2, 3, 1),
                             c(1, 0, 0, 1, 0, 1, 1))
colnames(dt.ex1) <- c("a", "b", "d")
decision.table <- SF.asDecisionTable(dataset = dt.ex1, decision.attr = 3,
                                     indx.nominal = c(3))

cut.values <- D.discretize.equal.intervals.RST(decision.table, nOfIntervals = 4)

## generate new decision table
new.decTable <- SF.applyDecTable(decision.table, cut.values)

Run the code above in your browser using DataLab