gemmr.generative_model._check_subspace_dimension

gemmr.generative_model._check_subspace_dimension(Sigmaxx, qx)

Interpret arguments qx and qy in mk_Sigma_model().

Parameters:
  • Sigmaxx (np.ndarray (px, px)) – the covariance matrix of the dataset
  • px (int) – number of variables in the dataset
  • qx (None or int or float) –
    • if None returns px
    • if > px returns px
    • if 0 <= qx <= 1 returns the number of principle components necessary
      to explain a fraction`qx` of the variance in Sigmaxx
    • otherwise returns the same value qx that was given
Returns:

Dimensionality of “dominant” subspace

Return type:

int

Raises:

ValueError – - if qx < 0 - if 1 <= px and qx is not an integer