ensemble_fs: Ensemble Feature Selection

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Uses an ensemble of feature selection methods to create a normalized quantitative score of all relevant features. Irrelevant features (e.g. features with too many missing values or variance = 1) will be deleted. See Details for a list of tests used in this function.

Usage

1
2
3
ensemble_fs(data, classnumber, NA_threshold = 0.2, cor_threshold = 0.7,
  runs = 100, selection = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE,
  FALSE))

Arguments

data

an object of class data.frame

classnumber

a number indicating the index of variable for binary classification

NA_threshold

a number in range of [0,1]. Threshold for deletion of features with a greater proportion of NAs than NA_threshold.

cor_threshold

a number used only for Spearman and Pearson correlation. Correlation threshold within features. If the correlation of 2 features is greater than cor_threshold the dependent feature is deleted.

runs

a number used only for randomForest and cforest. Amount of runs to gain higher robustness.

selection

a vector of length eight with TRUE or FALSE values. Selection of feature selection methods to be conducted.

Details

Following methods are provided in the ensemble_fs:

By the argument selection the user decides which feature selection methods are used in ensemble_fs. Default value is selection = c(TRUE, TRUE, TRUE,TRUE, TRUE, TRUE, FALSE, FALSE), i.e., the function does not use either of the cforest variable importance measures. The maximum score for features depends on the input of selection. The scores are always divided through the amount of selected feature selection, respectively the amount of TRUEs.

Value

table of normalized importance values of class matrix (used methods as rows and features of the imported file as columns).

Author(s)

Ursula Neumann

References

See Also

wilcox.test, randomForest, cforest, cor, glm

Examples

1
2
3
4
5
 ## Loading dataset in environment
 data(efsdata)
 ## Generate a ranking based on importance (with default NA_threshold = 0.2,
 ## cor_threshold = 0.7, selection = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE))
 efs <- ensemble_fs(efsdata, 5, runs=2)

Example output

[1] "default value for NA_threshold = 0.2"
[1] "default value for cor_threshold = 0.7"
[1] "default value for selection is c(TRUE, TRUE, TRUE,TRUE, TRUE, TRUE, FALSE, FALSE)"
[1] "Start Median"
[1] "Start Pearson"
[1] "Start Spearman"
[1] "Start LogReg"
[1] "Start RF"
[1] 1
Time difference of 0.02474976 secs
[1] 2
Time difference of 0.4320579 secs
[1] "Build return matrix"
[1] "Done"
Time difference of 0.5142276 secs
Warning messages:
1: In wilcox.test.default(x, y) : cannot compute exact p-value with ties
2: In wilcox.test.default(x, y) : cannot compute exact p-value with ties
3: In wilcox.test.default(x, y) : cannot compute exact p-value with ties
4: In wilcox.test.default(x, y) : cannot compute exact p-value with ties
5: In wilcox.test.default(x, y) : cannot compute exact p-value with ties

EFS documentation built on May 2, 2019, 9:58 a.m.

Related to ensemble_fs in EFS...