I have a gene expression profile with negative values.

Is there any way to do an Nonnegative matrix factorization (NMF) on a matrix which has a few negative values?

(I couldn't approximate the negatives by 1 because the range of negative values are really high.)



1 Answer 1


It sounds like you are looking for the semi-NMF algorithm, which relaxes the positive restriction on the input matrix (and one of the output matrixes). Mike Jordan has a paper discussing this technique including a description of an algorithm to compute it. link

I have to ask if this is really what you want to do. Gene expression data is inherently non-negative, which is why NMF is popular for gene expression analysis. Your large negative values are probably the result of a log-transform which you could undo and then apply a regular NMF. Ask whoever generated the data if any transformations were applied and consider undoing it and then running regular NMF. This is probably easier then rolling your own implementation of an exotic NMF variant.

Edit: If it's just a few negative entries, you could also consider removing the genes with negative entries.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.