plotAssignments: Plot assignment probabilities

Description Usage Arguments Value See Also Examples

View source: R/functions.public.R

Description

Plots the assignment probabilities of a previous query.

Usage

1
2
3
plotAssignments(queryResult, realLabels, 
  minProbAssignCoeff = 1, minDiffAssignCoeff = 0.8, 
  totalNumberOfClasses = NULL, pointSize=0.8, identify = FALSE)

Arguments

queryResult

Object returned by queryGeNetClassifier

realLabels

Factor. Actual/real class of the samples.

minProbAssignCoeff

Numeric. See queryGeNetClassifier for details.

minDiffAssignCoeff

Numeric. See queryGeNetClassifier for details.

totalNumberOfClasses

Numeric. Total number of classes the classifier was trained with. The assignment probability is determined bassed on it. It is not needed if there are samples of all the training classes.

pointSize

Numeric. Point size modifier.

identify

Logical. If TRUE and supported (X11 or quartz devices), the plot will be interactive and clicking on a point will identify the sample the point represents. Press ESC or right-click on the plot screen to exit.

Value

Plot.

See Also

Main package function and classifier training: geNetClassifier
Querying the classifier: queryGeNetClassifier

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
##########################
## Classifier training
##########################

# Load an expressionSet:
library(leukemiasEset)
data(leukemiasEset)

# Select the train samples: 
trainSamples<- c(1:10, 13:22, 25:34, 37:46, 49:58) 
# summary(leukemiasEset$LeukemiaType[trainSamples])

# Train a classifier or load a trained one:
# leukemiasClassifier <- geNetClassifier(leukemiasEset[,trainSamples], 
#    sampleLabels="LeukemiaType", plotsName="leukemiasClassifier") 
data(leukemiasClassifier) # Sample trained classifier

##########################
## External Validation:
##########################
# Select the samples to query the classifier 
#   - External validation: samples not used for training
testSamples <- c(1:60)[-trainSamples]         

# Make a query to the classifier:
queryResult <- queryGeNetClassifier(leukemiasClassifier, leukemiasEset[,testSamples])

##########################
## Plot:
##########################
plotAssignments(queryResult, realLabels=leukemiasEset[,testSamples]$LeukemiaType)

geNetClassifier documentation built on Nov. 8, 2020, 4:53 p.m.