module adabmDCA.graph
function update_mask_activation
update_mask_activation(Dkl: Tensor, mask: Tensor, nactivate: int) → Tensor
Updates the mask by removing the nactivate couplings with the smallest Dkl.
Args:
Dkl(torch.Tensor): Kullback-Leibler divergence matrix.mask(torch.Tensor): Mask.nactivate(int): Number of couplings to be activated at each graph update.
Returns:
torch.Tensor: Updated mask.
function update_mask_decimation
update_mask_decimation(mask: Tensor, Dkl: Tensor, drate: float) → Tensor
Updates the mask by removing the n_remove couplings with the smallest Dkl.
Args:
mask(torch.Tensor): Mask.Dkl(torch.Tensor): Kullback-Leibler divergence matrix.drate(float): Percentage of active couplings to be pruned at each decimation step.
Returns:
torch.Tensor: Updated mask.
function decimate_graph
decimate_graph(
pij: Tensor,
params: Dict[str, Tensor],
mask: Tensor,
drate: float
) → Tuple[Dict[str, Tensor], Tensor]
Performs one decimation step and updates the parameters and mask.
Args:
pij(torch.Tensor): Two-point marginal probability distribution.params(Dict[str, torch.Tensor]): Parameters of the model.mask(torch.Tensor): Mask.drate(float): Percentage of active couplings to be pruned at each decimation step.
Returns:
Tuple[Dict[str, torch.Tensor], torch.Tensor]: Updated parameters and mask.
This file was automatically generated via lazydocs.