`CenteredRBMs.CenteredRBM`

— Method`CenteredRBM(visible, hidden, w)`

Creates a centered RBM, with offsets initialized to zero.

`CenteredRBMs.CenteredRBM`

— Method`CenteredRBM(rbm, λv, λh)`

Creates a centered RBM, with offsets `λv`

(visible) and `λh`

(hidden). See http://jmlr.org/papers/v17/14-237.html for details. The resulting model is *not* equivalent to the original `rbm`

, unless `λv = 0`

and `λh = 0`

.

`RestrictedBoltzmannMachines.RBM`

— Method`RBM(centered_rbm::CenteredRBM)`

Returns an (uncentered) `RBM`

which neglects the offsets of `centered_rbm`

. The resulting model is *not* equivalent to the original `centered_rbm`

. To construct an equivalent model, use the function `uncenter(centered_rbm)`

instead (see `uncenter`

). Shares parameters with `centered_rbm`

.

`CenteredRBMs.CenteredBinaryRBM`

— Method`CenteredBinaryRBM(a, b, w, λv = 0, λh = 0)`

Construct a centered binary RBM. The energy function is given by:

\[E(v,h) = -a' * v - b' * h - (v - λv)' * w * (h - λh)\]

`CenteredRBMs.center!`

— Method`center!(centered_rbm, offset_v = 0, offset_h = 0)`

Transforms the offsets of `centered_rbm`

. The transformed model is equivalent to the original one (energies differ by a constant).

`CenteredRBMs.center`

— Method`center(rbm::RBM, offset_v = 0, offset_h = 0)`

Constructs a `CenteredRBM`

equivalent to the given `rbm`

. The energies assigned by the two models differ by a constant amount,

\[E(v,h) - E_c(v,h) = \sum_{i\mu}w_{i\mu}\lambda_i\lambda_\mu\]

where $E(v,h)$ is the energy assigned by the original `rbm`

, and $E_c(v,h)$ is the energy assigned by the returned `CenteredRBM`

.

This is the inverse operation of `uncenter`

.

To construct a `CenteredRBM`

that simply includes these offsets, call `CenteredRBM(rbm, offset_v, offset_h)`

instead.

`CenteredRBMs.uncenter`

— Method`uncenter(centered_rbm::CenteredRBM)`

Constructs an `RBM`

equivalent to the given `CenteredRBM`

. The energies assigned by the two models differ by a constant amount,

\[E(v,h) - E_c(v,h) = \sum_{i\mu}w_{i\mu}\lambda_i\lambda_\mu\]

where $E_c(v,h)$ is the energy assigned by `centered_rbm`

and $E(v,h)$ is the energy assigned by the `RBM`

constructed by this method.

This is the inverse operation of `center`

.

To construct an `RBM`

that simply neglects the offsets, call `RBM(centered_rbm)`

instead.