pyjuice.structures.HCLT

pyjuice.structures.HCLT(x: ~torch.Tensor, num_latents: int, num_bins: int = 32, sigma: float = 0.015625, chunk_size: int = 64, num_root_ns: int = 1, block_size: int | None = None, 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})

Construct Hidden Chow-Liu Trees (https://arxiv.org/pdf/2106.02264.pdf).

Parameters:
  • x (torch.Tensor) – the input data of size [# samples, # variables] used to construct the backbone Chow-Liu Tree

  • num_latents (int) – size of the latent space

  • num_bins (int) – number of bins to divide the input data for mutual information estimation

  • sigma (float) – a variation parameter used when estimating mutual information

  • chunk_size (int) – chunk size to compute mutual information (consider decreasing if running out of GPU memory)

  • num_root_ns (int) – number of root nodes

  • block_size (int) – block size

  • input_dist (Distribution) – input distribution