Expand description

Additional support functions

Functions

  • Splits a dataset consiting of two arrays according to a row-wise criteria
  • Generate random initializations from a dirichlet distribution.
  • Create data generated with a Gaussian mixture model. Returns $n_1+\ldots +n_k$ samples from a Gaussian mixture with $k$ components in a $d$-dimensional feature space. It also returns the $(n_1+\ldots +n_k) \times k$ “true” responisiblity matrix (i.e., only ones and zeros in its elements). For testing, it returns also the generated covariances Returns: (samples, responsibilities, means, covariances)
  • Gets the shape of an Array2 object or raise an error if not possible
  • Gets the shape of an Array3 object or raise an error if not possible