Learn R Programming

ClusterSignificance (version 1.0.3)

ClassifiedPoints-class: classification of the one dimensional points in a Pcp or Mlp object

Description

classification based on ROC params (TN TP FP FN)

Usage

"getData"(x, n = NULL)
classify(x, ...)
"classify"(x, ...)
"classify"(x, ...)
"initialize"(.Object, ..., scores, scores.points = scores.points, scores.index = scores.index, ROC)
"plot"(x, y, ...)
"show"(object)

Arguments

x
Pcp or Mlp Object for the function classify otherwise it is a ClassifiedPoints object
n
data to extract from ClassifiedPoints (NULL gives all)
...
additional arguments to pass on
.Object
internal object
scores
final scores
scores.points
sorted points
scores.index
index of sorted points
ROC
parameters (TN, TP, FN and FP)
y
default plot param, which should be set to NULL
object
ClassifiedPoints Object

Value

The classify function returns an object of class ClassifiedPoints

Details

Tests all possible discrimination lines and picks the one with highest score based on a score which is simply calculated by formula (TP - FP) + (TN - FN)

The plot shows the distribution of scores for different discrimination lines Each line is a separator that creates a score for the separation of two groups, and the height of the line marks the score for this separation.

Examples

Run this code

#use demo data
data(pcpMatrix)
groups <- rownames(pcpMatrix)

#run function
prj <- pcp(pcpMatrix, groups)
cl <- classify(prj)

#getData accessor
getData(cl)

#getData accessor specific
getData(cl, "scores")

#plot result
plot(cl)

Run the code above in your browser using DataLab