tick.simulation.weights_sparse_gauss

tick.simulation.weights_sparse_gauss(n_weights: int = 100, nnz: int = 10, std: float = 1.0, dtype='float64') → numpy.ndarray[source]

Sparse and gaussian model weights generator Instance of weights for a model, given by a sparse vector, where non-zero coordinates (chosen at random) are centered Gaussian with given standard-deviation

Parameters

n_weights : int, default=100

Number of weights

nnz : int, default=10

Number of non-zero weights

std : float, default=1.

Standard deviation of the Gaussian non-zero entries

dtype : {'float64', 'float32'}, default=’float64’

Type of the arrays used.

Returns

output : numpy.ndarray, shape=(n_weights,)

The weights vector