prediction_scores: Prediction scores for estimated graph

View source: R/score.R

prediction_scoresR Documentation

Prediction scores for estimated graph

Description

This function returns a set of metrics useful to evaluate the goodness of the estimation of the graph on simulated data, or whenever a true graph is available.

Usage

prediction_scores(trueG, estimatedG)

Arguments

trueG

the adjacency matrix of the true graph.

estimatedG

the adjacency matrix of the estimated graph.

Value

A vector with the number of true positives (TP), the number of false positives (FP), the number of false negatives (FN), the positive predictive value (PPV), the sensitivity (Se), and the F1 score (F1).

Examples

set.seed(123)
adj <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow=3)
mat <- simdata(n=100, p=3, B=adj, mu=5, mu_noise=1)
res <- PCzinb(mat, method="poi", alpha=0.05)
prediction_scores(adj, res)

drisso/learn2count documentation built on July 15, 2024, 11:13 p.m.