fitacc: Simulation accuracy.

Description Usage Arguments Value Author(s) Examples

View source: R/mnems.r

Description

Computes the accuracy of the fit between simulated and inferred mixture.

Usage

1
fitacc(x, y, strict = FALSE, unique = TRUE, type = "ham")

Arguments

x

mnem object

y

simulation object or another mnem object

strict

if TRUE, accounts for over/underfitting, i.e. the number of components

unique

if TRUE, phis of x and y are made unique each (FALSE if strict is TRUE)

type

type of accuracy. "ham" for hamming, "sens" for sensitivity and "spec for Specificity"

Value

plot of EM convergence

Author(s)

Martin Pirkl

Examples

1
2
3
4
5
6
7
8
9
sim <- simData(Sgenes = 3, Egenes = 2, Nems = 2, mw = c(0.4,0.6))
data <- (sim$data - 0.5)/0.5
data <- data + rnorm(length(data), 0, 1)
result <- mnem(data, k = 2, starts = 1)
fitacc(result, sim)
fitacc(result, sim, type = "sens")
fitacc(result, sim, type = "spec")
fitacc(result, sim, strict = TRUE, type = "sens")
fitacc(result, sim, strict = TRUE, type = "spec")

mnem documentation built on Nov. 18, 2020, 2 a.m.