View source: R/InstanceSelection.R
IS.FRPS.FRST | R Documentation |
This is a function for implementing instance selection using prototype selection method (FRPS) proposed by (Verbiest et al, 2013).
IS.FRPS.FRST(decision.table, type.alpha = "FRPS.1")
decision.table |
a |
type.alpha |
type of FRPS expressing the equations of |
This algorithm uses prototype selection (PS) to improve the accuracy of the k-nearest neighbour (kNN) method.
It selects a subset of instances S \subseteq X
and then classifies a new instance t
using the kNN rule acting over
S
instead of over X
. Based on fuzzy rough set theory, S
is built. Basically, two steps are performed in the algorithm.
First, the instances are ordered according to a measure called \alpha
which is based on fuzzy rough set theory that evaluates the lack of
predictive ability of the instances, and the instances for which the values exceeds a certain threshold are removed from training set.
To determine this threshold, we consider several equations which are applied on all instances.
These equations are constructed by considering fuzzy positive region membership degree on several implication and t-norm operators.
The following is the equations of \alpha
:
"FRPS.1"
: max_{y \notin [x]_{d}} \frac{1}{max_{i=1}^{m} \delta_{a_i}(x,y)}
"FRPS.2"
: OW A_w \left(\frac{1}{OW A_w \delta_{a_i}(x,y)}\right)
"FRPS.3"
: max_{y \notin [x]_{d}} \frac{1}{\displaystyle\sum\limits_{i=1}^m {\delta_{a_i}(x,y)}}
"FRPS.4"
: OW A_w \left(\frac{1}{\displaystyle\sum\limits_{i=1}^m {\delta_{a_i}(x,y)}}\right)
where [x]_d
and OW A_w
are equivalence class on the decision attribute and ordered weighted average operator, respectively.
And \delta_{a_i}(x,y)
is a distance measure of the attribute a_i
between x
and y
.
After that, 1knn
will be performed in order to select and get prototype S
which produces the highest training accuracy.
It should be noted that this function does not give the new decision table directly.
The other additional function called SF.applyDecTable
is used to produce new decision table based on
the output of this function.
A class "InstanceSelection"
that contains the following components:
indx.objects
: it contains all indexes of objects that are selected.
type.method
: a string representing a type of method. In this case, it is "IS.FRPS"
.
type.task
: a string showing the type of task which is "instance selection"
.
type.model
: a string representing the type of model which is "FRST"
. It means fuzzy rough set theory.
Lala Septem Riza
N. Verbiest, C. Cornelis, and F. Herrera, "A Fuzzy Rough Prototype Selection Method", Pattern Recognition, Vol. 46, no. 10, p. 2770 - 2782 (2013).
IS.FRIS.FRST
#############################################
## Example: Evaluate instances/objects and
## generate new decision table
#############################################
dt.ex1 <- data.frame(c(0.5, 0.2, 0.3, 0.7, 0.2, 0.2), c(0.1, 0.4, 0.2, 0.8, 0.4, 0.4),
c(0, 0, 0, 1, 1, 1))
colnames(dt.ex1) <- c("a1", "a2", "d")
decision.table <- SF.asDecisionTable(dataset = dt.ex1, decision.attr = 3, indx.nominal = c(3))
## evaluate instances
res.1 <- IS.FRPS.FRST(decision.table, type.alpha = "FRPS.3")
## generate new decision table
new.decTable <- SF.applyDecTable(decision.table, res.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.