getN: Function to get the required N given by the accuracy and the...

Description Usage Arguments Value Examples

View source: R/learningCurve.R

Description

Function to get the required N given by the accuracy and the learning curve model

Usage

1
getN(res, acc = 0.9)

Arguments

res

model results returned by learning_curve function

acc

accuracy that are quired

Value

sample size that are required

Examples

1
2
3
4
5
6
7
8
set.seed(2019)
n <- seq(20, 10000, 100)
accMat <- do.call(cbind, lapply(1:length(n), function(i){
tmp_n <- rep(n[i], 50)
y <- -2/(tmp_n^0.8) + 0.95 + rnorm(length(tmp_n), 0, 0.02)
}))
res <- learningCurve(accMat = accMat, n)
N <- getN(res, acc = 0.9)

SydneyBioX/scClassify documentation built on Oct. 22, 2021, 4:03 p.m.