spynnaker.pyNN.utilities.random_stats package

Module contents

class spynnaker.pyNN.utilities.random_stats.AbstractRandomStats

Bases: object

Statistics about PyNN ~spynnaker.pyNN.RandomDistribution objects.

abstractmethod cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

abstractmethod high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

abstractmethod low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

abstractmethod mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

abstractmethod ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

abstractmethod std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

abstractmethod var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsBinomialImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for binomial distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsExponentialClippedImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for clipped exponential distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsExponentialImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for exponential distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsGammaImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for gamma distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsLogNormalImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for log normal distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsNormalClippedImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for normal distributions that are clipped to a boundary (redrawn).

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsNormalImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for normal distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsPoissonImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for Poisson distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsRandIntImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for uniform distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsScipyImpl(distribution_type: str)

Bases: AbstractRandomStats

A Random Statistics object that uses scipy directly.

Parameters:

distribution_type – Name of the distribution type.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsUniformImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for uniform distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.

class spynnaker.pyNN.utilities.random_stats.RandomStatsVonmisesImpl

Bases: AbstractRandomStats

An implementation of AbstractRandomStats for von Mises distributions.

cdf(dist: RandomDistribution, v: float) float[source]
Returns:

The cumulative distribution function value for the value v.

high(distribution: RandomDistribution) float | None[source]
Returns:

The high cut-off value of the distribution, or None if the

distribution is unbounded.

low(distribution: RandomDistribution) float | None[source]
Returns:

The low cut-off value of the distribution, or None if the

distribution is unbounded.

mean(dist: RandomDistribution) float[source]
Returns:

The mean of the distribution.

ppf(dist: RandomDistribution, p: float) float[source]
Returns:

The percent point function value for the probability p.

std(dist: RandomDistribution) float[source]
Returns:

The standard deviation of the distribution.

var(dist: RandomDistribution) float[source]
Returns:

The variance of the distribution.