RoughSets (version 1.3-7)

SF.asFeatureSubset: Converting custom attribute name sets into a FeatureSubset object

Description

The function can be used to change a custom set of attribute names from a decision table into an object of the FeatureSubset class. It can be useful for converting results of discernibility matrix-based attribute selection methods (i.e. functions FS.all.reducts.computation and FS.one.reduct.computation).

Usage

SF.asFeatureSubset(colNames, decisionTable = NULL,
  attributeNames = NULL, type.method = "custom subset",
  model = "custom")

Value

an object of a class FeatureSubset

Arguments

colNames

a character vector containing names of attributes from a decision table

decisionTable

a decision table which contains attributes from colNames, can be NULL and in that case a non-NULL value of attributeNames must be given

attributeNames

a character vector of names of decision table's attributes, can be NULL and in that case a non-NULL value of decisionTable must be given

type.method

an indicator of the method used for selecting the attributes

model

an indicator of the model used for selecting the attributes

Author

Andrzej Janusz

Examples

Run this code
#############################################################
## Example 1:
#############################################################
data(RoughSetData)
wine.data <- RoughSetData$wine.dt
dim(wine.data)

## selection of an arbitrary attribute subset
attrNames = colnames(wine.data)[1:3]
attrNames
class(attrNames)

## convertion into a FeatureSubset object
reduct <- SF.asFeatureSubset(attrNames, wine.data,
                             type.method = "greedy reduct from a discernibility matrix")

class(reduct)
reduct

Run the code above in your browser using DataCamp Workspace