pyjuice.structures.RAT_SPN
- pyjuice.structures.RAT_SPN(num_vars: int, num_latents: int, depth: int, num_repetitions: int, num_pieces: int = 2, input_dist: ~pyjuice.nodes.distributions.distributions.Distribution | None = None, input_node_type: ~typing.Type[~pyjuice.nodes.distributions.distributions.Distribution] = <class 'pyjuice.nodes.distributions.categorical.Categorical'>, input_node_params: dict = {'num_cats': 256}, block_size: int | None = None)
Generate Random and Tensorized SPNs (https://proceedings.mlr.press/v115/peharz20a/peharz20a.pdf)
- Parameters:
num_vars (int) – number of variables
num_latents (int) – size of the latent space
depth (int) – splitting depth of variable scopes
num_repetitions (int) – number of random splits
num_pieces (int) – the number of sub-scopes splitted from any scope
input_dist (Distribution) – input distribution
block_size (int) – block size