Calculate score for each feature in each cell

cal_score_init(
  expr,
  tf = c("logtf", "tf"),
  idf = "prob",
  iae = "prob",
  par.idf = NULL,
  par.iae = NULL
)

Arguments

expr

a count matrix, features in row and cells in column

tf

a character, specify the TF method to use, can be "tf" or "logtf"

idf

a character, specify the IDF method to use. Available methods can be accessed using idf_iae_methods()

iae

a character, specify the IAE method to use. Available methods can be accessed using idf_iae_methods()

par.idf

other parameters for specified IDF methods

par.iae

other parameters for specified IAE methods

Value

a list of combined score, tf, idf and iae

Examples

data <- matrix(rpois(100, 2), 10, dimnames = list(1:10))
label <- sample(c("A", "B"), 10, replace = TRUE)
smartid:::cal_score_init(data,
  par.idf = list(label = label),
  par.iae = list(label = label)
)
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> Warning: no non-missing arguments to max; returning -Inf
#> $score
#>    [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#> 1     0    0    0    0    0    0    0    0    0     0
#> 2     0    0    0    0    0    0    0    0    0     0
#> 3     0    0    0    0    0    0    0    0    0     0
#> 4     0    0    0    0    0    0    0    0    0     0
#> 5     0    0    0    0    0    0    0    0    0     0
#> 6     0    0    0    0    0    0    0    0    0     0
#> 7     0    0    0    0    0    0    0    0    0     0
#> 8     0    0    0    0    0    0    0    0    0     0
#> 9     0    0    0    0    0    0    0    0    0     0
#> 10    0    0    0    0    0    0    0    0    0     0
#> 
#> $tf
#>          [,1]       [,2]       [,3]       [,4]       [,5]       [,6]       [,7]
#> 1  0.17427723 0.04443201 0.00000000 0.13969676 0.14948694 0.16698418 0.12508476
#> 2  0.09093039 0.08697351 0.25583932 0.04876637 0.09234487 0.04443201 0.00000000
#> 3  0.04649838 0.12777885 0.08001067 0.13969676 0.12132400 0.00000000 0.18221051
#> 4  0.17427723 0.16698418 0.04080533 0.04876637 0.06250081 0.16698418 0.00000000
#> 5  0.17427723 0.08697351 0.15409118 0.09526475 0.09234487 0.08697351 0.18221051
#> 6  0.04649838 0.08697351 0.00000000 0.04876637 0.17687841 0.12777885 0.00000000
#> 7  0.04649838 0.12777885 0.08001067 0.09526475 0.09234487 0.08697351 0.12508476
#> 8  0.13347190 0.04443201 0.04080533 0.04876637 0.03173862 0.08697351 0.06449688
#> 9  0.00000000 0.00000000 0.15409118 0.09526475 0.03173862 0.04443201 0.18221051
#> 10 0.04649838 0.16698418 0.11773676 0.18223826 0.09234487 0.12777885 0.06449688
#>          [,8]       [,9]      [,10]
#> 1  0.15410308 0.06058788 0.03635442
#> 2  0.03277907 0.22301862 0.10532349
#> 3  0.03277907 0.06058788 0.03635442
#> 4  0.12512394 0.00000000 0.13810257
#> 5  0.09527989 0.06058788 0.03635442
#> 6  0.00000000 0.17175163 0.20060338
#> 7  0.12512394 0.06058788 0.07143343
#> 8  0.09527989 0.06058788 0.10532349
#> 9  0.03277907 0.00000000 0.10532349
#> 10 0.23631862 0.22301862 0.10532349
#> 
#> $idf
#>    A A A A A A A A A A
#> 1  0 0 0 0 0 0 0 0 0 0
#> 2  0 0 0 0 0 0 0 0 0 0
#> 3  0 0 0 0 0 0 0 0 0 0
#> 4  0 0 0 0 0 0 0 0 0 0
#> 5  0 0 0 0 0 0 0 0 0 0
#> 6  0 0 0 0 0 0 0 0 0 0
#> 7  0 0 0 0 0 0 0 0 0 0
#> 8  0 0 0 0 0 0 0 0 0 0
#> 9  0 0 0 0 0 0 0 0 0 0
#> 10 0 0 0 0 0 0 0 0 0 0
#> 
#> $iae
#>    A A A A A A A A A A
#> 1  0 0 0 0 0 0 0 0 0 0
#> 2  0 0 0 0 0 0 0 0 0 0
#> 3  0 0 0 0 0 0 0 0 0 0
#> 4  0 0 0 0 0 0 0 0 0 0
#> 5  0 0 0 0 0 0 0 0 0 0
#> 6  0 0 0 0 0 0 0 0 0 0
#> 7  0 0 0 0 0 0 0 0 0 0
#> 8  0 0 0 0 0 0 0 0 0 0
#> 9  0 0 0 0 0 0 0 0 0 0
#> 10 0 0 0 0 0 0 0 0 0 0
#>