iNMF_lambda_tuning | R Documentation |
Based on Yang and Michailidis, 2016, to tune the value of the parameter lambda for the integrative NMF (iNMF), the objectives values of join NMF (jNMF) are compared to single view NMFs (sNMF), the principle is that join NMF represents complete homogeneity and single view NMF represents complete heterogeneity. To avoid overfitting the best lambda can be selected by plotting the difference of the unsquared residual quantities of jNMF and iNMF (Ri - Rj) over multiple values of lambda, and compare it to the difference of the unsquared residual quantities of sNMF and jNMF c*(Rj - Rs). The optimal lambda usually is the first lambda in which (Ri - Rj) < c*(Rj - Rs). Where c is a constant >= 2.
iNMF_lambda_tuning( matrix_list, lambdas = seq(0, 1, 0.1), Output_type = "residuals", thr_cons = 3, rank = 2, n_initializations = 10, iterations = 10^4, convergence_threshold = 40, Sp = 0, show_plot = TRUE, extract_features = FALSE )
matrix_list |
List of non-negative matrices. |
lambdas |
a sequence of lambdas to test. |
Output_type |
Type of desired output, could be:
|
thr_cons |
numeric value, Threshold constant c, in c*(Rj - Rs). |
rank |
numeric vector with rank to factorize. |
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 is constant for this number of iterations. |
Sp |
Sparcity constrain, values > 0 force sparcity in the H matrix. |
show_plot |
|
extract_features |
|
There are five different types of possible outputs, depending on the selected option on 'Output_type'. The default output is a data.frame with the residual resulting from tuning lambdas across multiple lambdas.
## Not run: # Compare the residual across multiple lambdas: iNMF_lambda_tuning(matrix_list = norm_mat_list, lambdas = seq(0, 1, 0.1), Output_type = "residuals", rank = 9, n_initializations = 5, iterations = 10^4, convergence_threshold = 40, Sp = 0, extract_features = FALSE) # Retrieve all the objects and extract the iNMF for the best lambda: inmf_tune <- iNMF_lambda_tuning(matrix_list = norm_mat_list, lambdas = seq(0, 1, 0.1), thr_cons = 4, Output_type = "all", rank = 9, n_initializations = 5, iterations = 10^4, convergence_threshold = 40) min(inmf_tune$residuals$lambda[inmf_tune$residuals$best_lambda]) inmf_tune$iNMF$lambda_0.2 ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.