Package 'ROCaggregator'

Title: Aggregate Multiple ROC Curves into One Global ROC
Description: Aggregates multiple Receiver Operating Characteristic (ROC) curves obtained from different sources into one global ROC. Additionally, it’s also possible to calculate the aggregated precision-recall (PR) curve.
Authors: Pedro Mateus [aut, cre]
Maintainer: Pedro Mateus <[email protected]>
License: MIT + file LICENSE
Version: 1.0.1
Built: 2024-12-04 07:09:41 UTC
Source: CRAN

Help Index


Compute the global confusion matrix from the FPR and TPR obtained from each node

Description

Compute the global confusion matrix from the FPR and TPR obtained from each node

Usage

partial_cm(
  fpr,
  tpr,
  thresholds,
  negative_count,
  total_count,
  descending = FALSE
)

Arguments

fpr

list - False positive rates for each individual ROC

tpr

list - True positive rates for each individual ROC

thresholds

list - Thresholds used to compute the fpr and tpr

negative_count

list - Total number of samples corresponding to the negative case

total_count

list - Total number of samples

descending

thresholds in descending order?

Value

global confusion matrix and thresholds


Compute the precision recall curve

Description

Compute the precision recall curve

Usage

precision_recall_curve(fpr, tpr, thresholds, negative_count, total_count)

Arguments

fpr

list - False positive rates for each individual ROC.

tpr

list - True positive rates for each individual ROC.

thresholds

list - Thresholds used to compute the fpr and tpr.

negative_count

vector - Total number of samples corresponding to the negative case.

total_count

vector - Total number of samples.

Value

list with the global precision, recall, and thresholds (increasing)


Compute Receiver operating characteristic (ROC)

Description

Compute Receiver operating characteristic (ROC)

Usage

roc_curve(fpr, tpr, thresholds, negative_count, total_count)

Arguments

fpr

list - False positive rates for each individual ROC

tpr

list - True positive rates for each individual ROC

thresholds

list - Thresholds used to compute the fpr and tpr

negative_count

vector - Total number of samples corresponding to the negative case

total_count

vector - Total number of samples

Value

list with the global fpr, tpr, and thresholds (decreasing)


Shift a vector left or right according to the value provided

Description

Shift a vector left or right according to the value provided

Usage

shift_vector(x, n)

Arguments

x

the vector

n

shift

Value

the vector shifted

Examples

shift_vector(c(1,2,3,4), 1)
shift_vector(c(1,2,3,4), -1)