pifit: Accuracy computation

Description Usage Arguments Value Author(s) Examples

View source: R/nempi_main.r

Description

Compares the ground truth of a perturbation profile with the inferred profile

Usage

1
pifit(x, y, D, unknown = "", balanced = FALSE, propagate = TRUE, knowns = NULL)

Arguments

x

object of class nempi

y

object of class mnemsim

D

data matrix

unknown

label for the unlabelled samples

balanced

if TRUE, computes balanced accuracy

propagate

if TRUE, propagates the perturbation through the network

knowns

subset of P-genes that are known to be perturbed (the other are neglegted)

Value

list of different accuracy measures: true/false positives/negatives, correlation, area under the precision recall curve, (balanced) accuracy

Author(s)

Martin Pirkl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(mnem)
seed <- 42
Pgenes <- 10
Egenes <- 10
samples <- 100
uninform <- floor((Pgenes*Egenes)*0.1)
Nems <- mw <- 1
noise <- 1
multi <- c(0.2, 0.1)
set.seed(seed)
simmini <- simData(Sgenes = Pgenes, Egenes = Egenes,
Nems = Nems, mw = mw, nCells = samples,
uninform = uninform, multi = multi,
badCells = floor(samples*0.1))
data <- simmini$data
ones <- which(data == 1)
zeros <- which(data == 0)
data[ones] <- rnorm(length(ones), 1, noise)
data[zeros] <- rnorm(length(zeros), -1, noise)
lost <- sample(1:ncol(data), floor(ncol(data)*0.5))
colnames(data)[lost] <- ""
res <- nempi(data)
fit <- pifit(res, simmini, data)

cbg-ethz/nempi documentation built on May 4, 2021, 9:44 a.m.