nanshe.misc.random_dictionary_learning_data module

random_dictionary_learning_data supports generating synthetic data.

Overview

The module random_dictionary_learning_data provides a way of generating synthetic data for testing the segmentation algorithm against. Moving forward the useful content in here will be refactored and moved into the data module. So, depending on this module is unwise.

API

class nanshe.misc.random_dictionary_learning_data.DictionaryLearningRandomDataGenerator(frame_shape, num_objects, num_groups, num_frames, mean_group_size, object_spread, object_max_intensity, object_min_intensity, background_noise_intensity)[source]

Bases: object

A Random Generator that build pseudo-data similar in nature to that which the ADINA algorithm is run.

class nanshe.misc.random_dictionary_learning_data.DictionaryLearningRandomDataSample[source]

Bases: object

Essentially a struct with its values set at runtime by DictionaryLearningRandomDataGenerator calls.

class nanshe.misc.random_dictionary_learning_data.MappingDiscreteGeometricDistributionGenerator(*args)[source]

Bases: object

A random generator of groups. Each group has a size that is geometrically distributed. However, the individuals chosen for the group are all equally likely.

class nanshe.misc.random_dictionary_learning_data.MappingDiscreteUniformDistributionGenerator(*args)[source]

Bases: object

Given a bunch of arguments. This will create a random element generator that returns one or many.

class nanshe.misc.random_dictionary_learning_data.NumpyRandomArrayDiscreteUniformDistributionGenerator(shape)[source]

Bases: object

Creates a random numpy array (with type bool) generator that will set a certain number of random positions in the array to True (like Bernoulli random distribution)