Learn R Programming

mAPKL (version 1.4.2)

metrics: Computes several clasification metrics

Description

This function calculates several classification related metrics. It uses the original and the predicted samples' labels to quantify the quality of the classification process. Those meassures give us a direct outlook of the selected "genes" and how well discriminate between two phenotypes.

Usage

metrics(classLbls, predLbls)

Arguments

classLbls
The initial class labels.
predLbls
The predicted class labels.

Value

  • AUCThe Area Under the ROC curve as a degree of samples discrimination
  • AccuracyThe classification accuracy
  • MCCThe MCC classification meassure
  • SpecificityThe degree of true negative's identification
  • SensitivityThe degree of true positive's identification

Examples

Run this code
## Suppose 'val' represent the correct validation set labels
## and 'predictions' the predicted labels according to an SVM model

    val <- c(rep(0,8),rep(1,4))
    predictions <- c(rep(0,6),1,1,rep(1,3),0)
    perfMetrics <- metrics(classLbls=val, predLbls=predictions)

Run the code above in your browser using DataLab