gemmr.generative_model._Sigmaxy_negative_min_eval

gemmr.generative_model._Sigmaxy_negative_min_eval(uvrot, assemble_Sigmaxy, Sigmaxx, Sigmayy, U, V, m, qx, qy, rng, true_corrs, uvrots, min_eval_thr=1e-05)

Find the negative of the minimum eigenvalue of (the Schur complement of) the joint covariance matrix \(\Sigma\).

Random directions within the dominant subsapce are chosen for the X and Y between-set weight vectors. The weight vectors are calculated as linear combinations of the first qx (for X) and qy (for Y) basis vectors (given by U and V), and the corresponding expansion coefficients are given by uvrots.

Parameters:
  • uvrot (np.ndarray (qx+qy,)) – the first qx (qy) elements are interpreted as rotations for the qx (qy) dimensional dominant subspace for X and Y
  • assemble_Sigmaxy (function) – either _assemble_Sigmaxy_pls or _assemble_Sigmaxy_cca
  • Sigmaxx (np.ndarray (n_X_features, n_X_features)) – covariance-matrix for modality X, i.e. the upper left block of the joint covariance matrix
  • Sigmayy (np.ndarray (n_Y_features, n_Y_features)) – covariance-matrix for modality Y, i.e. lower right block of the joint covariance matrix
  • U (np.ndarray (n_X_features, n_X_features)) – columns of U contain basis vectors for X data
  • V (np.ndarray n_Y_features, n_Y_features)) – columns of V contain basis vectors for Y data
  • m (int >= 1) – number of cross-modality modes to be encoded
  • qx (int) – latent mode vectors for modality X are calculated as a random linear combination of - a random linear combination of the first q_x columns of U - a random linear combination of the remaining columns of U
  • qy (int) – latent mode vectors for modality Y are calculated as a random linear combination of - a random linear combination of the first q_y columns of V - a random linear combination of the remaining columns of V
  • rng (random number generator instance) –
  • true_corrs (np.ndarray (m,)) – cross-modality correlations that each latent mode should have
  • expl_var_ratio_thr (float) – threshold for required within-modality variance along latent mode vectors
  • uvrots (list) – In case the minimum eigenvalue is positive, (min_eval, urot, vrot) is appended to the list uvrots
  • min_eval_thr (float) – minimum acceptable eigenvalue, i.e. differential evolution algorithm stopps, once an eigenvalue is found that is greater than min_eval_thr. Should be >= 0.
Returns:

  • negative_min_eval (float) – minus the minimum eigenvalue of the Schur-complement of the joint-covariance matrix. if negative_min_eval is <= 0, i.e. if min_eval is >= 0, Sigma will be positive definite.
  • Side effect
  • ———–
  • In case the minimum eigenvalue is positive, (min_eval, urot, vrot) is
  • appended to the list uvrots