run_NMF_tensor | R Documentation |
Computes NMF on tensorflow using the reticulate framework, uses a non-negative matrix as input
run_NMF_tensor( X, ranks, method = "NMF", n_initializations = 10, iterations = 10^4, convergence_threshold = 40, n_neighbors = 4, alpha = 0.1, lamb = 10, graph = NULL, seed = NULL, nthreads = 0, extract_features = FALSE )
X |
Input matrix, should be a non-negative matrix |
ranks |
numeric vector with ranks to factorize |
method |
method to use in the factorization, available: "NMF", "GRNMF_SC" |
n_initializations |
Number of initializations to evaluate |
iterations |
Maximum number of iterations to run for every initialization |
convergence_threshold |
The factorization stops, if the convergence test constant for this number of iterations |
n_neighbors |
for method "GRNMF_SC", the number of neighbors to take into account when building the graph G |
alpha |
for method "GRNMF_SC", regularization parameter alpha |
lamb |
for method "GRNMF_SC", regularization parameter lambda |
graph |
for method "GRNMF_SC", square matrix representing a graph between columns of the input matrix, values correspond to edge weight, if NULL will compute own graph. |
seed |
Numeric seed to initialize matrices W and H. |
nthreads |
Number of CPU threads used to perform the NMF decomposition, (in case a GPU is not available). 0 means the system picks an appropriate number. |
extract_features |
if TRUE performs feature extraction for all f actorization ranks > 2. |
A ButchR_NMF object, containg the factorized matrices W and H, along with factorization metrics
nmf_exp <- run_NMF_tensor(matrix(1:1000, ncol = 10), ranks = 2:5, n_initializations = 10, iterations = 10^4, convergence_threshold = 40) nmf_exp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.