getN {scClassify} | R Documentation |
Function to get the required N given by the accuracy and the learning curve model
getN(res, acc = 0.9)
res |
model results returned by |
acc |
accuracy that are quired |
sample size that are required
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)