probabilitiesPlot: Function to plot the probabilities to belong to a certain...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/logisticRegression.R

Description

Function to plot the probabilities to belong to a certain class in binary classification problems. These probabilities are often calculated using a logistic regression model. The class membership of the samples is displayed using a colored strip (with legend below the plot).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
probabilitiesPlot(
  proportions,
  classVar,
  sampleNames,
  plot = TRUE,
  barPlot = FALSE,
  layout = TRUE,
  main = NULL,
  sub = NULL,
  ...
)

Arguments

proportions

A vector containing the calculated probabilities to belong to a certain class in binary classification problems. These probabilities are often calculated using a logistic regression model.

classVar

A vector containing the class where the sample belongs t

sampleNames

A vector with the names of the samp

plot

logical. If FALSE, nothing is plotted

barPlot

Should a barplot be drawn (TRUE) or a scatterplot like MCREstimate-type scores plot (the default, FALSE

layout

boolean indicating whether mcrPlot should prespecify a layout for a single plot (default, TRUE) or whether the user takes care of the layout (FALSE)

main

Main title for the scores plot; if not supplied, 'Scores Plot' is used as a defaul

sub

Subtitle for the scores plot; if not supplied, the classification technique and the chosen number of features are displayed

...

Additional graphical parameters to pass to the plot functio

Value

no returned value, a plot is drawn in the current device.

Author(s)

Willem Talloen and Tobias Verbeke

See Also

logReg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
  if (require(ALL)){
  data(ALL, package = "ALL")
    ALL <- addGeneInfo(ALL)
    ALL$BTtype <- as.factor(substr(ALL$BT,0,1))
    logRegRes <- logReg(geneSymbol = "HLA-DPB1", object = ALL, groups = "BTtype")
    # scoresplot
    probabilitiesPlot(proportions = logRegRes$fit, classVar = logRegRes$y,
      sampleNames = rownames(logRegRes), main = 'Probability of being a T-cell type ALL')
    # barplot
    probabilitiesPlot(proportions = logRegRes$fit, classVar = logRegRes$y, barPlot=TRUE,
      sampleNames = rownames(logRegRes), main = 'Probability of being a T-cell type ALL')
  }

## End(Not run)

a4Base documentation built on Nov. 8, 2020, 5:41 p.m.