Skip to content

module adabmDCA.resampling


function compute_mixing_time

compute_mixing_time(
    sampler: Callable[, Tensor],
    data: Tensor,
    params: Dict[str, Tensor],
    n_max_sweeps: int,
    beta: float
) → Dict[str, List[Union[float, int]]]

Computes the mixing time using the t and t/2 method. The sampling will halt when the mixing time is reached or the limit of n_max_sweeps sweeps is reached.

Args:

  • sampler (Callable): Sampling function.
  • data (torch.Tensor): Initial data.
  • params (Dict[str, torch.Tensor]): Parameters for the sampling. - "bias": Tensor of shape (L, q) - local biases. - "coupling_matrix": Tensor of shape (L, q, L, q) - coupling matrix.
  • n_max_sweeps (int): Maximum number of sweeps.
  • beta (float): Inverse temperature for the sampling.

Returns:

  • Dict[str, List[Union[float, int]]]: Results of the mixing time analysis. - "seqid_t": List of average sequence identities at time t. - "std_seqid_t": List of standard deviations of sequence identities at time t. - "seqid_t_t_half": List of average sequence identities between t and t/2. - "std_seqid_t_t_half": List of standard deviations of sequence identities between t and t/2. - "t_half": List of t/2 values (integers).

This file was automatically generated via lazydocs.