plotAssignments {geNetClassifier} | R Documentation

## Plot assignment probabilities

### Description

Plots the assignment probabilities of a previous query.

### Usage

    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

    ##########################
    ## 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)

[Package geNetClassifier version 1.28.0 Index]