plot.LPS: Plot method for LPS objects

Description Usage Arguments Author(s) See Also Examples

View source: R/plot.LPS.r

Description

This function plots the distributions of the LPS scores in each group for a fitted LPS object.

Usage

1
2
3
4
  ## S3 method for class 'LPS'
plot(x, y, method=c("Wright", "Radmacher", "exact"), threshold = 0.9,
    values = FALSE, col.classes = c("#FFCC00", "#1144CC"), xlim, yaxt = "s",
    xlab = "LPS", ylab, las = 0, lwd = 2,...)

Arguments

x

An object of class "LPS", as returned by LPS.

y

Single character value defining y axis : "density" or (bayesian) "probability".

method

Single character value, the method to use for predictions. See predict.LPS.

threshold

Single numeric value, the confidence threshold to use for the "gray zone" (scores for which none of the two groups can be assigned with a probability greater than this threshold). See predict.LPS.

values

Single logical value, whether to plot individual scores from the training series or not.

col.classes

Character vector of two values giving to each class a distinct color.

xlim

To be passed to plot, see plot.default.

yaxt

To be passed to plot, see par.

xlab

To be passed to plot, see plot.default.

ylab

To be passed to plot, see plot.default.

las

To be passed to plot, see par.

lwd

To be passed to plot, see par.

...

Further arguments to be passed to plot or par.

Author(s)

Sylvain Mareschal

See Also

LPS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
  # Data with features in columns
  data(rosenwald)
  group <- rosenwald.cli$group
  expr <- t(rosenwald.expr)
  
  # NA imputation (feature's mean to minimize impact)
  f <- function(x) { x[ is.na(x) ] <- round(mean(x, na.rm=TRUE), 3); x }
  expr <- apply(expr, 2, f)
  
  # Coefficients
  coeff <- LPS.coeff(data=expr, response=group)
  
  # 10 best features model
  m <- LPS(data=expr, coeff=coeff, response=group, k=10)
  
  
  # Distributions of scores in each group
  plot(m, "density")
  
  # Probability for each group along the score axis
  plot(m, "probability", yaxt="s")

Example output



LPS documentation built on May 29, 2021, 5:07 p.m.