nimble.random

Module for random operations with Nimble.

Nimble is able to guarantee reproduciblility through pythonRandom and numpyRandom. These are, respectively, instances of Python and Numpy’s randomness objects and are always instantiated using the same seed value on import. Nimble always uses these instances internally to maintain the guarantee of reproduciblility. Users wanting to maintain reproduciblility must also use these instances for random operations.

pythonRandom

The random.Random instance used within Nimble.

numpyRandom

The np.random.RandomState instance used within Nimble.

alternateControl([seed, useLog])

Context manager to operate outside of the current random state.

data(numPoints, numFeatures, sparsity[, ...])

Generate a data object with random contents.

generateSubsidiarySeed()

Generate a random integer usable as a python or numpy random seed.

setSeed(seed, *[, useLog])

Set the seeds on all sources of randomness in nimble.