Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Discretization.R

This function implements unsupervised discretization into intervals containing similar number of instances ("quantile-based").

1 | ```
D.discretize.quantiles.RST(decision.table, nOfIntervals = 4)
``` |

`decision.table` |
an object inheriting from the |

`nOfIntervals` |
a positive integer giving the number of intervals. |

This approach belongs to a class of unsupervised discretization methods
since it does not consider the class labels. Each numeric attribute is divided in `k`

intervals which contain approximately
the same number of data instances (objects).
Detailed information regarding this method can be found in (Dougherty et al, 1995).

It should be noted that the output of this function is an object of a class `"Discretization"`

which contains the cut values.
The function `SF.applyDecTable`

has to be used in order to generate the new (discretized) decision table.

An object of a class `"Discretization"`

which stores cuts for each conditional attribute.
See `D.discretization.RST`

.

Andrzej Janusz

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).

`D.discretize.equal.intervals.RST`

, `D.global.discernibility.heuristic.RST`

,
`D.local.discernibility.heuristic.RST`

, `SF.applyDecTable`

.
A wrapper function for all available discretization methods: `D.discretization.RST`

1 2 3 4 5 6 7 8 9 10 11 | ```
#################################################################
## Example: Determine cut values and generate new decision table
#################################################################
data(RoughSetData)
wine.data <- RoughSetData$wine.dt
cut.values <- D.discretize.quantiles.RST(wine.data, nOfIntervals = 5)
## generate a new decision table
wine.discretized <- SF.applyDecTable(wine.data, cut.values)
dim(wine.discretized)
lapply(wine.discretized, unique)
``` |

```
Loading required package: Rcpp
[1] 178 14
$alcohol
[1] (13.8, Inf] (12.8,13.3] (13.3,13.8] (12.2,12.8] [-Inf,12.2]
5 Levels: [-Inf,12.2] < (12.2,12.8] < (12.8,13.3] < ... < (13.8, Inf]
$malid_acid
[1] (1.51,1.73] (1.73,2.13] (2.13,3.41] [-Inf,1.51] (3.41, Inf]
5 Levels: [-Inf,1.51] < (1.51,1.73] < (1.73,2.13] < ... < (3.41, Inf]
$ash
[1] (2.42,2.61] [-Inf,2.18] (2.61, Inf] (2.18,2.3] (2.3,2.42]
5 Levels: [-Inf,2.18] < (2.18,2.3] < (2.3,2.42] < ... < (2.61, Inf]
$alcalinity_of_ash
[1] [-Inf,16.8] (18.6,20] (20,22] (16.8,18.6] (22, Inf]
Levels: [-Inf,16.8] < (16.8,18.6] < (18.6,20] < (20,22] < (22, Inf]
$magnesium
[1] (111, Inf] (94.8,101] (88,94.8] (101,111] [-Inf,88]
Levels: [-Inf,88] < (88,94.8] < (94.8,101] < (101,111] < (111, Inf]
$total_phenols
[1] (2.53,2.86] (2.86, Inf] (2.05,2.53] (1.65,2.05] [-Inf,1.65]
5 Levels: [-Inf,1.65] < (1.65,2.05] < (2.05,2.53] < ... < (2.86, Inf]
$flavanoids
[1] (2.98, Inf] (2.46,2.98] (1.74,2.46] (0.872,1.74] [-Inf,0.872]
5 Levels: [-Inf,0.872] < (0.872,1.74] < (1.74,2.46] < ... < (2.98, Inf]
$nonflavanoid_phenols
[1] (0.26,0.3] [-Inf,0.26] (0.3,0.39] (0.39,0.48] (0.48, Inf]
5 Levels: [-Inf,0.26] < (0.26,0.3] < (0.3,0.39] < ... < (0.48, Inf]
$proanthocyanins
[1] (1.99, Inf] (1.1,1.42] (1.66,1.99] (1.42,1.66] [-Inf,1.1]
5 Levels: [-Inf,1.1] < (1.1,1.42] < (1.42,1.66] < ... < (1.99, Inf]
$color_intensity
[1] (5.28,6.99] (4.08,5.28] (6.99, Inf] (2.92,4.08] [-Inf,2.92]
5 Levels: [-Inf,2.92] < (2.92,4.08] < (4.08,5.28] < ... < (6.99, Inf]
$hue
[1] (0.91,1.04] (1.04,1.16] (0.74,0.91] (1.16, Inf] [-Inf,0.74]
5 Levels: [-Inf,0.74] < (0.74,0.91] < (0.91,1.04] < ... < (1.16, Inf]
$od
[1] (3.26, Inf] (2.9,3.26] (2.52,2.9] [-Inf,1.79] (1.79,2.52]
5 Levels: [-Inf,1.79] < (1.79,2.52] < (2.52,2.9] < ... < (3.26, Inf]
$proline
[1] (1.05e+03, Inf] (606,742] (742,1.05e+03] [-Inf,475]
[5] (475,606]
5 Levels: [-Inf,475] < (475,606] < (606,742] < ... < (1.05e+03, Inf]
$class
[1] 1 2 3
Levels: 1 2 3
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.