# Restricted Boltzmann Machine

Restricted Boltzmann machines are implemented in different flavors in NetKet.

## RbmSpin

This type of RBM has spin $1/2$ hidden units, and is defined by:

for arbitrary local quantum numbers $s_i$. The total number of variational parameters is $\mathcal{O} (M \times N)$, and all parameters are taken complex-valued. For more information see (1).

Parameter Possible values Description Default value
Alpha Float Alternative to Nhidden, here $\alpha= M/N$ None
InitFile String If specified, network parameters are loaded from the given file None
InitRandom Boolean Whether to initialize the parameters with random gaussian-distributed values True
Nhidden Integer The number of hidden units $M$ None
SigmaRand Float If InitRandom is chosen, this is the standard deviation of the gaussian 0.1
UseHiddenBias Boolean Whether to use the hidden bias $b_j$ True
UseVisibleBias Boolean Whether to use the visible bias $a_i$ True

### Example

pars['Machine']={
'Name'           : 'RbmSpin',
'Alpha'          : 1.0,
}


## RbmSpinSymm

This type of RBM has spin $1/2$ hidden units, and is constructed to be invariant under specific permutations of the graph indices. In particular, $\Psi(s_1,\dots s_N) = \Psi(s_{P_k(1)} \dots s_{P_k(N)})$, where $P_k(i)$ is the $k$ -th permutation of the index $i$, and assuming a total of $N_p$ distinct permutations.

for arbitrary local quantum numbers $s_i$. The total number of variational parameters is $\mathcal{O} (\alpha \times N)$, and all parameters are taken complex-valued. For more information see the translation-invariant RBM used in (1).

Parameter Possible values Description Default value
Alpha Float Hidden unit density $\alpha$ None
InitFile String If specified, network parameters are loaded from the given file None
InitRandom Boolean Whether to initialize the parameters with random gaussian-distributed values True
SigmaRand Float If InitRandom is chosen, this is the standard deviation of the gaussian 0.1
UseHiddenBias Boolean Whether to use the hidden bias $b_j$ True
UseVisibleBias Boolean Whether to use the visible bias $a$ True

### Example

pars['Machine']={
'Name'           : 'RbmSpinSymm',
'Alpha'          : 1.0,
}


## RbmMultival

This type of RBM has spin $1/2$ hidden units, and couplings dependent on the quantum numbers. It is defined by:

where $s_i$ are local quantum numbers taking $m$ possible values. The total number of variational parameters is $\mathcal{O} (m \times M \times N)$, and all parameters are taken complex-valued.

Parameter Possible values Description Default value
Alpha Float Alternative to Nhidden, here $\alpha= M/N$ None
InitFile String If specified, network parameters are loaded from the given file None
InitRandom Boolean Whether to initialize the parameters with random gaussian-distributed values True
Nhidden Integer The number of hidden units $M$ None
SigmaRand Float If InitRandom is chosen, this is the standard deviation of the gaussian 0.1
UseHiddenBias Boolean Whether to use the hidden bias $b_j$ True
UseVisibleBias Boolean Whether to use the visible bias $a_i$ True

### Example

pars['Machine']={
'Name'           : 'RbmMultival',
'Alpha'          : 1.0,
}