---
name: "mlpack_amf_NMFMultiplicativeDistanceUpdate"
section: "3"
platform: "linux"
package: "mlpack-doc"
version: "1.0.10-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlpack_amf_NMFMultiplicativeDistanceUpdate"
---

# mlpack\_amf\_NMFMultiplicativeDistanceUpdate(3)

The multiplicative distance update rules for matrices W and H.

## NAME

mlpack::amf::NMFMultiplicativeDistanceUpdate -

The multiplicative distance update rules for matrices W and H.

## SYNOPSIS

### Public Member Functions

**NMFMultiplicativeDistanceUpdate** ()\
 template\<typename MatType \> void **Initialize** (const MatType &dataset, const size\_t rank)\

### Static Public Member Functions

template\<typename MatType \> static void **HUpdate** (const MatType &V, const arma::mat &W, arma::mat &H)\
 *The update rule for the encoding matrix H.*  template\<typename MatType \> static void **WUpdate** (const MatType &V, arma::mat &W, const arma::mat &H)\
 *The update rule for the basis matrix W.*

## Detailed Description

The multiplicative distance update rules for matrices W and H.

Definition at line 38 of file nmf\_mult\_dist.hpp.

## Constructor & Destructor Documentation

### mlpack::amf::NMFMultiplicativeDistanceUpdate::NMFMultiplicativeDistanceUpdate ()` [inline]`

Definition at line 42 of file nmf\_mult\_dist.hpp.

## Member Function Documentation

### template\<typename MatType \> static void mlpack::amf::NMFMultiplicativeDistanceUpdate::HUpdate (const MatType &V, const arma::mat &W, arma::mat &H)` [inline]`, ` [static]`

The update rule for the encoding matrix H. The formula used is  The function takes in all the matrices and only changes the value of the H matrix.

**Parameters:**

*V* Input matrix to be factorized. \
 *W* Basis matrix. \
 *H* Encoding matrix to be updated.

Definition at line 84 of file nmf\_mult\_dist.hpp.

### template\<typename MatType \> void mlpack::amf::NMFMultiplicativeDistanceUpdate::Initialize (const MatType &dataset, const size\_trank)` [inline]`

Definition at line 45 of file nmf\_mult\_dist.hpp.

### template\<typename MatType \> static void mlpack::amf::NMFMultiplicativeDistanceUpdate::WUpdate (const MatType &V, arma::mat &W, const arma::mat &H)` [inline]`, ` [static]`

The update rule for the basis matrix W. The formula used is  The function takes in all the matrices and only changes the value of the W matrix.

**Parameters:**

*V* Input matrix to be factorized. \
 *W* Basis matrix to be updated. \
 *H* Encoding matrix.

Definition at line 64 of file nmf\_mult\_dist.hpp.

## Author

Generated automatically by Doxygen for MLPACK from the source code.
