Hi community, I have an interesting challenge that i think that it can be resolved using NMF. I have a total of 52 product with different protein profiles. I would like to make two protein premixes (two unique profiles) to create all the SKU using different concentrations of them (mixing). I have tried the following code and it partially works. The main problem is that the levels that i have in the spec are the minimum protein concentrations [minimum guarantee]. The solution that I got is the average that minimize the error, but with this profile of proteins and concentrations I have profiles that do not reach the minimum requirements. We can overdose, but we cannot under dose. Code: Data=read.table("clipboard", header=T, sep="\t", dec=".") res=nmf(Data[,-1],2, nrun=30, seed=12345) C=as.matrix(.coef(res)*100000) S=as.matrix(basis(res)/100000) #write.csv(S%*%C, "Test1.csv") DD=(Data[,-1]-S%*%C)/(Data[,-1])*100+100 summary(DD) Is there any way to add some restrictions to the NMF? for example W%*%H> Data Is there a better algorithm to factorize this data set? Thank you so much for your help! Cheers, Marcal