C.FRNN.O.FRST {RoughSets} | R Documentation |
The fuzzy-rough ownership nearest neighbor algorithm
Description
It is used to predict classes of new datasets/patterns based on the fuzzy-rough ownership nearest neighbor algorithm (FRNN.O) proposed by (Sarkar, 2007).
Usage
C.FRNN.O.FRST(decision.table, newdata, control = list())
Arguments
decision.table |
a |
newdata |
a See |
control |
a list of other parameters.
|
Details
This method improves fuzzy -nearest neighbors (FNN) by introducing rough sets into it.
To avoid determining
by trial and error procedure, this method uses all training data. Uncertainties in data are accommodated by
introducing the rough ownership function. It is the following equation
of each class expressing a squared weighted distance between a test pattern and all training data
and constrained fuzzy membership
.
where
The predicted value of is obtained by selecting class
where
is maximum.
Value
A matrix of predicted classes of newdata.
Author(s)
Lala Septem Riza
References
M. Sarkar, "Fuzzy-Rough Nearest-Neighbor Algorithm in Classification" Fuzzy Sets and Systems, vol. 158, no. 19, p. 2123 - 2152 (2007).
See Also
Examples
#############################################################
## In this example, we are using Iris dataset.
## It should be noted that since the values of the decision attribute are strings,
## they should be transformed into numeric values using unclass()
#############################################################
data(iris)
## shuffle the data
set.seed(2)
irisShuffled <- iris[sample(nrow(iris)),]
## transform values of the decision attribute into numerics
irisShuffled[,5] <- unclass(irisShuffled[,5])
## split the data into training and testing data
iris.training <- irisShuffled[1:105,]
iris.testing <- irisShuffled[106:nrow(irisShuffled),1:4]
## convert into the standard decision table
colnames(iris.training) <- c("Sepal.Length", "Sepal.Width", "Petal.Length",
"Petal.Width", "Species")
decision.table <- SF.asDecisionTable(dataset = iris.training, decision.attr = 5,
indx.nominal = c(5))
tst.iris <- SF.asDecisionTable(dataset = iris.testing)
## in this case, we are using "gradual" for type of membership
control <- list(m = 2)
## Not run: res.test.FRNN.O <- C.FRNN.O.FRST(decision.table = decision.table, newdata = tst.iris,
control = control)
## End(Not run)