It is a process for nding a subset of features which attempts to obtain the same quality as the complete feature set. In other words, its purpose is to select the signi cant features and eliminate the dispensible ones. It is a useful and necessary process when we are facing datasets containing large numbers of features. From RST and FRST perspective, feature selection refers to searching superreducts and reducts. In the package, we provide the following functions, e.g.,:

  • FS.reduct.computation: It is an additional function aimed as wrapper of approaches calculating a reduct.
  • FS.all.reducts.computation: It is a function used for computation of all reducts from a discernibility matrix based on RST and FRST.
  • FS.feature.subset.computation: It is a function aimed as a wrapper of approaches calculating a superreduct

Outputs of these function are a decision reduct instead of a new decision table. So, to generate a new decision table we use the SF.applyDecTable function.

  • FS.reduct.computation

R> data(RoughSetData)
R> decision.table <- RoughSetData$hiring.dt
R> ## generate single reduct using RST
R> reduct.1 <- FS.reduct.computation(decision.table, method = "permutation.heuristic")
R> print(reduct.1)
$reduct
Experience Reference
2 4

$type.method
[1] "permutation.heuristic"
$type.task
[1] "feature selection"
$model
[1] "RST"
attr(,"class")
[1] "FeatureSubset" "list"
R> ## generate single reduct using FRST
R> reduct.2 <- FS.reduct.computation(decision.table, method = "nearOpt.fvprs")
R> print(reduct.2)
$reduct
[1] 1 2
$type.method
[1] "near.optimal.fvprs"
$type.task
[1] "feature selection"
$model
[1] "FRST"
attr(,"class")
[1] "FeatureSubset" "list"


R> ## generate new decision table according to the reduct.1
R> new.decTable.1 <- SF.applyDecTable(decision.table, reduct.1)


R> ## generate new decision table according to the reduct.2
R> new.decTable.2 <- SF.applyDecTable(decision.table, reduct.2)

 

  • FS.all.reducts.computation

R> ########################################################
R> ## Example 1: Generate a single reduct and
R> ## new decision table using RST
R> ########################################################
R> data(RoughSetData)
R> decision.table <- RoughSetData$hiring.dt
R> ## build the decision-relation discernibility matrix
R> res.2 <- BC.discernibility.mat.RST(decision.table, range.object = NULL)

R> ## generate single reduct
R> reduct <- FS.all.reducts.computation(res.2)
R> print(reduct)
$decision.reduct
$decision.reduct$1
Diploma Experience
1 2
$decision.reduct$2
Experience Reference
2 4
$core
Experience
2
$discernibility.type
[1] "RST"
$type.task
[1] "computation of all reducts"
$type.model
[1] "RST"
attr(,"class")
[1] "ReductSet" "list"

R> ## generate new decision table
R> new.decTable <- SF.applyDecTable(decision.table, reduct, control = list(indx.reduct = 1))

R> ##############################################################
R> ## Example 2: Generate a single reduct and
R> ## new decision table using FRST
R> ##############################################################
R> data(RoughSetData)
R> decision.table <- RoughSetData$hiring.dt
R> ## build the decision-relation discernibility matrix
R> control.1 <- list(type.relation = c("crisp"),
+ type.aggregation = c("crisp"),
+ t.implicator = "lukasiewicz", type.LU = "implicator.tnorm")
R> res.1 <- BC.discernibility.mat.FRST(decision.table, type.discernibility = "standard.red",
+ control = control.1)
R> ## generate single reduct
R> reduct <- FS.all.reducts.computation(res.1)
R> print(reduct)

$decision.reduct
$decision.reduct$1
Diploma Experience
1 2
$decision.reduct$2
Experience Reference
2 4
$core
Experience
2
$discernibility.type
[1] "standard.red"
$type.task
[1] "computation of all reducts"
$type.model
[1] "FRST"
attr(,"class")
[1] "ReductSet" "list"

R> ## generate new decision table
R> new.decTable <- SF.applyDecTable(decision.table, reduct, control = list(indx.reduct = 1))

 

  • FS.feature.subset.computation

R> ###############################################################
R> ## Example 1: generate reduct and new decision table using RST
R> ###############################################################
R> data(RoughSetData)
R> decision.table <- RoughSetData$hiring.dt
R> ## generate single superreduct
R> res.1 <- FS.feature.subset.computation(decision.table,
+ method = "quickreduct.rst")
R> print(res.1)
$reduct
Diploma Experience
1 2
$type.method

[1] "quickreduct"
$type.task
[1] "feature selection"
$model
[1] "RST"
attr(,"class")
[1] "FeatureSubset" "list"

R> ## generate new decision table according to the reduct
R> new.decTable <- SF.applyDecTable(decision.table, res.1)

R> ###############################################################
R> ## Example 2: generate reduct and new decision table using FRST
R> ###############################################################
R> data(RoughSetData)
R> decision.table <- RoughSetData$housing7.dt
R> ## generate single superreduct
R> res.2 <- FS.feature.subset.computation(decision.table,
+ method = "quickreduct.frst")
R> print(res.2)
$reduct
RM DIS
6 8
$type.method
[1] "fuzzy.dependency"
$type.task
[1] "feature selection"
$model
[1] "FRST"
attr(,"class")
[1] "FeatureSubset" "list"

R> ## generate new decision table according to the reduct
R> new.decTable <- SF.applyDecTable(decision.table, res.2)