gemmr.generative_model._generate_random_dominant_subspace_rotations

gemmr.generative_model._generate_random_dominant_subspace_rotations(U, V, m, qx, qy, rng, uvrots)

Generates random weight vectors in the dominant subspaces (of dimension qx and qy).

Separately for X and Y, random rotation matrices are obtained via QR decomposition of a matrix with random entries drawn from a standard normal distribution and choosing the Q factor; the basis vectors U (for X) and V (for Y are then multiplied by these rotation matrices and the first m columns are selected and returned.

Parameters:
  • U (np.ndarray(px, px)) – basis vectors for X
  • V (np.ndarray(py, py)) – basis vectors for Y
  • m (int) – number of between-set association modes
  • qx (int) – the dimensionality of the “dominant” subspace for X
  • qy (int) – the dimensionality of the “dominant” subspace for Y
  • rng (random number generator instance) –
  • uvrots (IGNORED) – present for signature compatibility with _generate_dominant_subspace_rotations_from_opti()
Returns:

  • U_dominant (np.ndarray (px, m)) – weight vectors for X living in “dominant” subspace
  • V_dominant (np.ndarray (py, m)) – weight vectors for Y living in “dominant subspace