sparse_random_projection reduces the dimensionality of a population by projecting the original data with a sparse random matrix. Generally more efficient and faster to compute than a Gaussian random projection matrix, while providing similar embedding quality.

sparse_random_projection(population, variables, n_components)

Arguments

population

tbl with grouping (metadata) and observation variables.

variables

character vector specifying observation variables.

n_components

size of the projected feature space.

Value

Dimensionality reduced population.

Examples

population <- tibble::tibble( Metadata_Well = c("A01", "A02", "B01", "B02"), AreaShape_Area_DNA = c(10, 12, 7, 7), AreaShape_Length_DNA = c(2, 3, 1, 5), Intensity_DNA = c(8, 20, 12, 32), Texture_DNA = c(5, 2, 43, 13) ) variables <- c("AreaShape_Area_DNA", "AreaShape_Length_DNA", "Intensity_DNA", "Texture_DNA") sparse_random_projection(population, variables, 2)
#> # A tibble: 4 x 3 #> Metadata_Well R1 R2 #> <chr> <dbl> <dbl> #> 1 A01 -10 2 #> 2 A02 -12 3 #> 3 B01 -7 1 #> 4 B02 -7 5