Package org.dulab.javanmf.updaterules
Class MUpdateRule
java.lang.Object
org.dulab.javanmf.updaterules.UpdateRule
org.dulab.javanmf.updaterules.RegularizationUpdateRule
org.dulab.javanmf.updaterules.MUpdateRule
public class MUpdateRule extends RegularizationUpdateRule
Performs multiplicative update for the euclidean distance with regularization
- Author:
- Du-Lab Team dulab.binf@gmail.com
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MUpdateRule(double lambda, double mu)
Creates an instance ofMUpdateRule
with given regularization coefficients -
Method Summary
Modifier and Type Method Description double
update(org.ejml.data.DMatrixRMaj x, org.ejml.data.DMatrixRMaj w, org.ejml.data.DMatrixRMaj h)
Updates matrix H to minimize distance between X and WH
-
Constructor Details
-
MUpdateRule
public MUpdateRule(double lambda, double mu)Creates an instance ofMUpdateRule
with given regularization coefficients- Parameters:
lambda
- l1-regularization coefficientmu
- l2-regularization coefficient
-
-
Method Details
-
update
public double update(@Nonnull org.ejml.data.DMatrixRMaj x, @Nonnull org.ejml.data.DMatrixRMaj w, @Nonnull org.ejml.data.DMatrixRMaj h)Description copied from class:UpdateRule
Updates matrix H to minimize distance between X and WH- Specified by:
update
in classUpdateRule
- Parameters:
x
- matrix of shape [Npoints, Nvectors]w
- matrix of shape [Npoints, Ncomponents]h
- matrix of shape [Ncomponents, Nvectors]- Returns:
- increment of |H|
-