stnmf.init.random

stnmf.init.random(v, r, rng=None, dtype='float32')

Initialize feature matrix by random sampling

Parameters:
  • v ((n,m) array_like) – Input matrix

  • r (int) – Number of components

  • rng (numpy.random.Generator or int or None, optional) – Random number generator (RNG) instance. If integer, it will be the seed for initializing a new RNG. If None, the RNG will be initialized without a seed based on OS context. Default is None

  • dtype (str or type, optional) – Number format with which to calculate. Default is ‘float32’

Returns:

w ((n,r) numpy.ndarray) – Initialized w

See also

stnmf.util.create_rng

Create an RNG instance