Description Usage Arguments Details Value Examples
View source: R/sparse_random_projection.R
generate_component_matrix
generates the sparse random component matrix
for performing sparse random projection. If density
is the density of
the sparse matrix and n_components
is the size of the projected space,
the elements of the random matrix are drawn from
1 | generate_component_matrix(n_features, n_components, density)
|
n_features |
the dimensionality of the original space. |
n_components |
the dimensionality of the projected space. |
density |
the density of the sparse random matrix. |
-sqrt(1 / (density * n_components))
with probability density / 2
0
with probability 1 - density
sqrt(1 / (density * n_components))
with probability density / 2
A sparse random matrix of size (n_features, n_components)
.
1 | generate_component_matrix(500, 100, 0.3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.