weightM function

Generate optimal GMM weighting matrix