fm.rsparse.proj | R Documentation |
fm.rsparse.proj
creates a sparse projection matrix stored in memory.
fm.rsparse.proj(nrow, ncol, density, name = "")
nrow |
the number of rows in the generated matrix. |
ncol |
the number of columns in the generated matrix. |
density |
the ratio of non-zero entries to the total number of elements. |
name |
the name of the matrix. It's stored on disks, it's used as the file name. |
The non-zero values in the sparse projection matrix are either 1 or -1. Their values are uniformly randomly chosen to be 1 or -1.
a FlashR matrix.
mat <- fm.rsparse.proj(10000, 100, 0.001) # a sparse projection matrix.