fs.bw: Feature Selection Using Between-Group to Within-Group (BW)...

Description Usage Arguments Value Author(s) References Examples

View source: R/mt_fs.R

Description

Feature selection using ratio of between-group to within-group sums of squares (BW).

Usage

1
  fs.bw(x,y,...)

Arguments

x

A data frame or matrix of data set.

y

A factor or vector of class.

...

Arguments to pass(current ignored).

Value

A list with components:

fs.rank

A vector of feature ranking scores.

fs.order

A vector of feature order from best to worst.

stats

A vector of measurements.

Author(s)

Wanchang Lin

References

Dudoit, S., Fridlyand, J. and Speed, T.P. Comparison of discrimination methods for classification of tumours using gene expression data. Journal of the American Statistical Association. Vol.97, No.457, 77-87.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## prepare data set
data(abr1)
cls <- factor(abr1$fact$class)
dat <- abr1$pos
## dat <- abr1$pos[,110:1930]

## fill zeros with NAs
dat <- mv.zene(dat)

## missing values summary
mv <- mv.stats(dat, grp=cls) 
mv    ## View the missing value pattern

## filter missing value variables
## dim(dat)
dat <- dat[,mv$mv.var < 0.15]
## dim(dat)

## fill NAs with mean
dat <- mv.fill(dat,method="mean")

## log transformation
dat <- preproc(dat, method="log10")

## select class "1" and "2" for feature ranking
ind <- grepl("1|2", cls)
mat <- dat[ind,,drop=FALSE] 
mat <- as.matrix(mat)
grp <- cls[ind, drop=TRUE]   

## apply BW ratio method for feature selection/ranking
res <- fs.bw(mat,grp)
names(res)

mt documentation built on Feb. 2, 2022, 1:07 a.m.

Related to fs.bw in mt...