renozao / NMF

NMF: A Flexible R package for Nonnegative Matrix Factorization
137 stars 40 forks source link

how consensus matrix is calculated #51

Closed fromdputto closed 9 years ago

fromdputto commented 9 years ago

How does the consensus matrix is calculated ? I understand the part that NMF generates two matrix W and H of rank r. But how are we calculate consensus matrix from W and H ? Thanks !

renozao commented 9 years ago

The consensus matrix is the average connectivity matrix (from clustering based on H) of multiple NMF runs. Each run gives a cluster membership for each sample (columns), from max row of each column of H, which gives a connectivity matrix. The average of all connectivity matrices across runs is the consensus matrix.

fromdputto commented 9 years ago

From this my interpretation is "in case of small value of 'nrun' the consensus matrix can be misleading" . Thanks for explanation.

renozao commented 9 years ago

Correct. You need a reasonnable value of nrun to achieve stability of the consensus matrix.

sdoerstling commented 7 years ago

@renozao Is it possible to extract the average connectivity matrix based on cluster membership for each gene (row)?