did.dissimilarity

Implements DIDEstimator and NormalizedDIDEstimator classes to compute the DID dissimilarity in an efficient way. Also implements functions for computing h and q from the precomputed objects.

Module Contents

Classes

DIDEstimator

Implementsa class.

NormalizedDIDEstimator

Implementsa class.

Functions

naive_solve(f_hat, g_hat, lambda_)

compute_h(kernel, coords, x_nystrom_points, r_in_inv, eigenvector)

Compute h map defined below at image coordinates.

compute_q(kernel, coords, x_nystrom_points, r_in_inv, eigenvector, f_hat, g_hat, gg_inv)

class did.dissimilarity.DIDEstimator(in_kernel, out_kernel, in_nystrom, out_nystrom)

Bases: torch.nn.Module

Implementsa class.

pre_compute(self, reg_cholesky_in)
forward(self, in_f, out_f, mask, in_g, out_g, lambda_)
class did.dissimilarity.NormalizedDIDEstimator(in_kernel, out_kernel, in_nystrom, out_nystrom)

Bases: DIDEstimator

Implementsa class.

forward(self, in_f, out_f, mask, in_g, out_g, lambda_)
naive_solve_with_vector(self, lambda_)
did.dissimilarity.naive_solve(f_hat, g_hat, lambda_)
did.dissimilarity.compute_h(kernel, coords, x_nystrom_points, r_in_inv, eigenvector)

Compute h map defined below at image coordinates.

did.dissimilarity.compute_q(kernel, coords, x_nystrom_points, r_in_inv, eigenvector, f_hat, g_hat, gg_inv)