learningCurve {scClassify} | R Documentation

## Fit learning curve for accuracy matrix

### Description

Fit learning curve for accuracy matrix

### Usage

    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

    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)

[Package scClassify version 1.4.0 Index]