R/tf_idf_iae_wrappers.R
iae_hdb.Rd
inverse average expression using hdbscan cluster as label
iae_hdb(expr, features = NULL, multi = TRUE, thres = 0, minPts = 2, ...)
a matrix, features in row and cells in column
vector, feature names or indexes to compute
logical, if to compute based on binary (FALSE) or multi-class (TRUE)
numeric, cell only counts when expr > threshold, default 0
integer, minimum size of clusters, default 2.
Details in dbscan::hdbscan()
.
parameters for dbscan::hdbscan()
a matrix of inverse average expression score
Details as iae_prob()
.
set.seed(123)
data <- matrix(rpois(100, 2), 10, dimnames = list(1:10))
smartid:::iae_hdb(data)
#> 3 0 2 2 0 0 3
#> 1 0.4054651 0.7537718 2.3025851 2.3025851 0.7537718 0.7537718 0.4054651
#> 2 0.4964369 0.7621401 1.9636097 1.9636097 0.7621401 0.7621401 0.4964369
#> 3 0.5978370 1.3925249 1.1856237 1.1856237 1.3925249 1.3925249 0.5978370
#> 4 0.8708284 0.1177830 2.2082744 2.2082744 0.1177830 0.1177830 0.8708284
#> 5 2.3795461 0.3690975 0.2513144 0.2513144 0.3690975 0.3690975 2.3795461
#> 6 0.3364722 0.7997569 1.5198257 1.5198257 0.7997569 0.7997569 0.3364722
#> 7 0.8708284 0.1177830 0.8708284 0.8708284 0.1177830 0.1177830 0.8708284
#> 8 1.9636097 0.6286087 0.4964369 0.4964369 0.6286087 0.6286087 1.9636097
#> 9 1.1260113 0.7035100 0.2876821 0.2876821 0.7035100 0.7035100 1.1260113
#> 10 0.9555114 1.4170660 0.3364722 0.3364722 1.4170660 1.4170660 0.9555114
#> 0 1 1
#> 1 0.7537718 0.05406722 0.05406722
#> 2 0.7621401 0.76214005 0.76214005
#> 3 1.3925249 0.59783700 0.59783700
#> 4 0.1177830 0.87082836 0.87082836
#> 5 0.3690975 0.06899287 0.06899287
#> 6 0.7997569 0.64185388 0.64185388
#> 7 0.1177830 2.20827441 2.20827441
#> 8 0.6286087 0.76214005 0.76214005
#> 9 0.7035100 1.52605630 1.52605630
#> 10 1.4170660 0.64185388 0.64185388