Package org.dulab.javanmf.updaterules
Class UpdateRule
java.lang.Object
org.dulab.javanmf.updaterules.UpdateRule
- Direct Known Subclasses:
RegularizationUpdateRule
public abstract class UpdateRule
extends java.lang.Object
Provides a template for updating matrix H in the direction of minimizing the distance D(X, WH)
- Author:
- Du-Lab Team dulab.binf@gmail.com
-
Field Summary
-
Constructor Summary
Constructors Constructor Description UpdateRule(Measure measure)
Creates an instance ofUpdateRule
-
Method Summary
Modifier and Type Method Description abstract 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
-
Field Details
-
Constructor Details
-
UpdateRule
Creates an instance ofUpdateRule
- Parameters:
measure
- instance ofMeasure
associated with the update rule
-
-
Method Details
-
update
public abstract double update(@Nonnull org.ejml.data.DMatrixRMaj x, @Nonnull org.ejml.data.DMatrixRMaj w, @Nonnull org.ejml.data.DMatrixRMaj h)Updates matrix H to minimize distance between X and WH- Parameters:
x
- matrix of shape [Npoints, Nvectors]w
- matrix of shape [Npoints, Ncomponents]h
- matrix of shape [Ncomponents, Nvectors]- Returns:
- increment of |H|
-