fatf.utils.data.instance_augmentation.random_binary_sampler

fatf.utils.data.instance_augmentation.random_binary_sampler(elements_number: int, samples_number: int = 50) → numpy.ndarray[source]

Samples samples_number of random binary vectors of length elements_number.

New in version 0.1.1.

Parameters
elements_numberinteger

The number of samples to generate.

samples_numberinteger, optional (default=50)

The number of binary elements in each sample.

Returns
samplesnumpy.ndarray

A binary numpy array of shape samples_number``X``elements_number with random samples.

Raises
TypeError

Either samples_number or elements_number is not an integer.

ValueError

Either samples_number or elements_number is smaller than 1.