View source: R/Discretization.R
D.discretization.RST | R Documentation |
It is a wrapper function for all discretization methods based on RST. It provides an interface that allows users to use the discretization methods easily.
D.discretization.RST(
decision.table,
type.method = "unsupervised.quantiles",
...
)
decision.table |
an object inheriting from the |
type.method |
a character representing a discretization method to be used in the computations. Currently it can be one of the following methods:
|
... |
parameters that are passed to the discretization methods. See the manual of particular functions. |
The discretization is used to convert numeric attributes into nominal ones in an information system. It is usually a preliminary step for the most of methods based on the rough set theory, which need nominal attributes, for exemple, to compute the indiscernibility relation.
Output of this function is an object of a class Discretization
which
contains cut values. The function SF.applyDecTable
can be used
to generate a new (discretized) decision table from the computed cuts. Type of
all attributes in the resulting table will be changed into nominal (i.e. ordered factors).
All implemented supervised discretization methods need a nominal decision attribute.
Furthermore, especially for the method type "global.discernibility"
, all conditional attributes
must be numeric. A different method needs to be chosen in a case when
a data set contains attributes of mixed types (numeric and nominal).
An object of a class "Discretization"
which stores cuts for each conditional attribute. It contains the following components:
cut.values
: a list representing cut values for each of numeric attributes. NULL value means that
no cut was selected for a given attribute.
type.method
: the type of method which is used to define cut values.
type.task
: the type of task which is "discretization"
.
model
: the type of model which is "RST"
.
Andrzej Janusz
BC.LU.approximation.RST
, FS.reduct.computation
, SF.applyDecTable
.
#################################################################
## Example: Determine cut values and generate new decision table
#################################################################
data(RoughSetData)
wine.data <- RoughSetData$wine.dt
cut.values1 <- D.discretization.RST(wine.data,
type.method = "unsupervised.quantiles",
nOfIntervals = 3)
## generate a new decision table
wine.discretized1 <- SF.applyDecTable(wine.data, cut.values1)
dim(wine.discretized1)
lapply(wine.discretized1, unique)
cut.values2 <- D.discretization.RST(wine.data,
type.method = "global.discernibility")
wine.discretized2 <- SF.applyDecTable(wine.data, cut.values2)
dim(wine.discretized2)
lapply(wine.discretized2, unique)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.