The hamming module

class hamming.Optimizer(key=0, d0=0.0, d0_r=0.0, d1=0.0, d1_r=0.0, delta=0.0, KL=Array(0., dtype=float64), KL_aux=inf, remp=None, Pemp=None, Pmodel=None, Nsteps=0, accepted=0, acc_ratio=Array(1., dtype=float64), save_logKLs_flag=0, logKLs=None, idx=0, mod_divisor=0, Nsteps_max=1000)[source]

Stochastic optimization

hamming.compute_row_distances(_idx, pytree)[source]

for each data sample indexed by “sample_idx”, computes the distance between it and the rest

hamming.jcompute_distances(X1, X2, crossed_distances, check_format=True, sort=False)[source]

This routine works for Ising spins variables defined as +-1 (this is faster than scipy)