pifit | R Documentation |
Compares the ground truth of a perturbation profile with the inferred profile
pifit(x, y, D, unknown = "", balanced = FALSE, propagate = TRUE, knowns = NULL)
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) |
list of different accuracy measures: true/false positives/negatives, correlation, area under the precision recall curve, (balanced) accuracy
Martin Pirkl
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.