plot.marginalRelevance: Plot marginalRelevance Objects

Description Usage Arguments Details Author(s) See Also Examples

Description

Plots marginal relevance scores for features of a given data matrix. The default plot shows: the marginal relevance score (MR score) of each feature. The "pairs" and "parallelcoord" show scatterplot matrix and the parallel coordinates plot of features ordered by their MR score.

Usage

1
2
## S3 method for class 'marginalRelevance'
plot(x, newdata = NULL, n.feat = NULL, type = "default", ...) 

Arguments

x

a marginalRelevance object.

newdata

a matrix containing the new input data.

n.feat

the number of features with highest MR score to plot. Default is all features.

type

"parallelcoord", "pairs" or default.

...

options directly passed to the plot function.

Details

If newdata is omitted the predictions are based on the data used for deriving the MR score.

Author(s)

K. Domijan

See Also

marginalRelevance

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
34
35
36
37
38
39
40
41
42
43
44
45
46
data(microarray)

profiles <- as.matrix(microarray[, -2309])
tumourType <-  microarray[, 2309]
 
 margRelv <- marginalRelevance(profiles, tumourType)


# plot 30 gene profiles with highest marginal relevance score
 plot(margRelv, type = "parallelcoord", n.feat = 50, col = tumourType )


## Not run: 

library(kernlab)
data(spam)

test <- sample(1:4601,2000)


dt <- as.matrix(spam[-test ,-58])
labels <- spam[-test , 58]

 
margRelv <- marginalRelevance(dt, labels)

#plot MR scores
plot(margRelv)

plot(margRelv , col = labels, type = "pairs", n.feat = 5)
plot(margRelv , col = labels, type = "parallelcoord", n.feat = 30)


# test set
plot(margRelv , as.matrix(spam[test ,-58]), col = spam[test , 58], 
type = "pairs", n.feat = 5)

plot(margRelv , as.matrix(spam[test ,-58]), col = spam[test , 58], 
type = "parallelcoord", n.feat = 30)



 

 
## End(Not run)

BKPC documentation built on May 1, 2019, 9:10 p.m.