multigeom.datasets.synthetic#

Synthetic neural data with a known ground truth, to learn the tools on and to test them.

`GaborTeacher` is a model of V1-like neurons with known receptive fields: each neuron
has a Gabor filter (position, size, orientation, spatial frequency, phase) and is either
a *simple cell* (rectified filter output) or a *complex cell* (energy: the output of the
filter and of its quadrature pair, combined). It follows the encoder contract, so its
Fisher information J(x) is a ground truth for the geometry of an encoder fitted to its
responses.

    teacher = GaborTeacher(n_neurons=50, seed=0).calibrate(images)   # order-1 responses
    noisy, clean = make_synthetic_neural_data(teacher, images, noise_sigma=0.5, seed=1)
    ceiling = noise_ceiling(clean, noise_sigma=0.5)    # best correlation of any model

`make_synthetic_experiment` does all of it in one call, on TinyImageNet images, and
splits the images for fitting and testing.

Functions

make_synthetic_experiment([n_neurons, ...])

Simulate an experiment that shows TinyImageNet images to V1-like neurons.

noise_ceiling(clean, noise_sigma)

Per neuron, the correlation between the noisy responses and the clean ones that a model predicting the clean responses exactly would reach on the noisy data: sqrt(var / (var + sigma^2)).

Classes

GaborTeacher(*args, **kwargs)

Ground-truth encoder of V1-like neurons.

SyntheticExperiment(teacher, x_train, ...)

A synthetic experiment.