R: Permutation Statistics for the Relief Algorithm
permuteRelief
R Documentation
Permutation Statistics for the Relief Algorithm
Description
This function uses a permutation approach to determining the relative magnitude of Relief scores (Kira and Rendell, 1992 and Kononenko, 1994).
Usage
permuteRelief(x, y, nperm = 100, ...)
Arguments
x
a data frame of predictor data
y
a vector of outcomes
nperm
the number of random permutations of the data
...
options to pass to attrEval, such as the exact Relief algorithm, to use
Details
The scores for each predictor are computed using the original data and after outcome data are randomly scrambled (nprem times). The mean and standard deviation of the permuted values are determined and a standardized version of the observed scores are determined by subtracting the permuted means from the original values, then dividing each by the corresponding standard deviation.
Value
a list with elements
standardized
a vector of standardized predictor scores
permutations
the values of the permuted scores, for plotting to assess the permutation distribution
observed
the observed scores
options
a list of options passed using ...
Author(s)
Max Kuhn
References
Kira, K., & Rendell, L. (1992). The feature selection problem: Traditional methods and a new algorithm. Proceedings of the Eleventh International Conference on Machine Learning, 129-129.
Kononenko, I. (1994). Estimating attributes: analysis and extensions of RELIEF. Machine Learning: ECML-94, 171-182.
See Also
attrEval
Examples
set.seed(874)
reliefEx3 <- easyBoundaryFunc(500)
reliefEx3$X1 <- scale(reliefEx3$X1)
reliefEx3$X2 <- scale(reliefEx3$X2)
reliefEx3$prob <- NULL
standardized <- permuteRelief(reliefEx3[, 1:2], reliefEx3$class,
## For efficiency, a small number of
## permutations are used here.
nperm = 50,
estimator="ReliefFequalK",
ReliefIterations= 50)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(AppliedPredictiveModeling)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AppliedPredictiveModeling/permuteRelief.Rd_%03d_medium.png", width=480, height=480)
> ### Name: permuteRelief
> ### Title: Permutation Statistics for the Relief Algorithm
> ### Aliases: permuteRelief
> ### Keywords: htest
>
> ### ** Examples
>
> set.seed(874)
> reliefEx3 <- easyBoundaryFunc(500)
> reliefEx3$X1 <- scale(reliefEx3$X1)
> reliefEx3$X2 <- scale(reliefEx3$X2)
> reliefEx3$prob <- NULL
>
> standardized <- permuteRelief(reliefEx3[, 1:2], reliefEx3$class,
+ ## For efficiency, a small number of
+ ## permutations are used here.
+ nperm = 50,
+ estimator="ReliefFequalK",
+ ReliefIterations= 50)
>
>
>
>
>
>
> dev.off()
null device
1
>