cr.nimble.dsp.sparse_approximation_cw

cr.nimble.dsp.sparse_approximation_cw(X, K)[source]

Keeps only largest K non-zero entries by magnitude in each column of X

Parameters
  • X (jax.numpy.ndarray) – An (N,S) data matrix with data points in columns

  • K (int) – The number of largest entries to be kept in each column of X

Returns

X modified so that all entries except the K largest entries are set to 0 in each column

Return type

(jax.numpy.ndarray)