This dispatcher computes the gradient for the similarity part of the SiMLR objective, ensuring it is a descent direction for the energy function. Supports partial matching for energy_type.

calculate_simlr_gradient(
  V,
  X,
  U,
  energy_type,
  clipping_threshold = NULL,
  lambda = 1,
  prior_matrix = NULL,
  verbose = 0
)

Arguments

V

The current loading matrix [p x k].

X

The data matrix for the modality [n x p].

U

The shared basis matrix [n x k].

energy_type

Character string specifying the similarity objective. Supports partial matching (e.g., "reg" for "regression", "cca" for "cca" or "acc"). Valid options: regression, reconorm, lowRankRegression, lrr, cca, acc, normalized_correlation, nc, logcosh, kurtosis, exp, gauss, dat.

clipping_threshold

Optional numeric value for gradient clipping.

lambda

Numeric, weight for domain energy (default = 1.0).

prior_matrix

Optional matrix of prior weights, same shape as V (used with "dat").

verbose

Integer, verbosity level: 0 (none), 1 (log matched energy_type) (default = 0).

Value

A matrix [p x k] representing the descent direction.