learningCurve: Fit learning curve for accuracy matrix

Description Usage Arguments Value Author(s) Examples

View source: R/learningCurve.R

Description

Fit learning curve for accuracy matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
learningCurve(
  accMat,
  n,
  auto_initial = TRUE,
  a = NULL,
  b = NULL,
  c = NULL,
  d_list = NULL,
  fitmodel = c("nls", "nls_mix", "gam"),
  plot = TRUE,
  verbose = TRUE
)

Arguments

accMat

Matrix of accuracy rate where column indicate different sample size

n

Vector indicates the sample size

auto_initial

whether automatical intialise

a

input the parameter a starting point

b

input the parameter a starting point

c

input the parameter a starting point

d_list

range of d

fitmodel

"nls", "nls_mix", "gam"

plot

indicates whether plot or not

verbose

indicates whether verbose or not

Value

list of results

Author(s)

Yingxin Lin

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.