labeled inverse average expression: probability based
iae_prob(expr, features = NULL, label, multi = TRUE, thres = 0)a matrix of inverse average expression score
$$\mathbf{IAE_{i,j}} = log(1+\frac{mean(N_{i,j\in D})}{max(mean(N_{i,j\in \hat D}))+ e^{-8}}*mean(N_{i,j\in D}))$$ where \(N_{i,j\in D}\) is the counts of feature \(i\) in cell \(j\) within class \(D\), and \(\hat D\) is the class except \(D\).
data <- matrix(rpois(100, 2), 10, dimnames = list(1:10))
smartid:::iae_prob(data, label = sample(c("A", "B"), 10, replace = TRUE))
#> B A A A A A A
#> 1 1.3862944 1.3862944 1.3862944 1.3862944 1.3862944 1.3862944 1.3862944
#> 2 0.8266786 0.4730853 0.4730853 0.4730853 0.4730853 0.4730853 0.4730853
#> 3 0.6931472 0.6931472 0.6931472 0.6931472 0.6931472 0.6931472 0.6931472
#> 4 1.2845117 1.6003432 1.6003432 1.6003432 1.6003432 1.6003432 1.6003432
#> 5 1.5436865 1.0958650 1.0958650 1.0958650 1.0958650 1.0958650 1.0958650
#> 6 0.4462871 1.4256338 1.4256338 1.4256338 1.4256338 1.4256338 1.4256338
#> 7 0.3184537 2.0932349 2.0932349 2.0932349 2.0932349 2.0932349 2.0932349
#> 8 1.7047481 0.8472979 0.8472979 0.8472979 0.8472979 0.8472979 0.8472979
#> 9 0.0000000 18.9960449 18.9960449 18.9960449 18.9960449 18.9960449 18.9960449
#> 10 0.0000000 20.4639832 20.4639832 20.4639832 20.4639832 20.4639832 20.4639832
#> A A A
#> 1 1.3862944 1.3862944 1.3862944
#> 2 0.4730853 0.4730853 0.4730853
#> 3 0.6931472 0.6931472 0.6931472
#> 4 1.6003432 1.6003432 1.6003432
#> 5 1.0958650 1.0958650 1.0958650
#> 6 1.4256338 1.4256338 1.4256338
#> 7 2.0932349 2.0932349 2.0932349
#> 8 0.8472979 0.8472979 0.8472979
#> 9 18.9960449 18.9960449 18.9960449
#> 10 20.4639832 20.4639832 20.4639832