brainspy.utils.signal#

Set of fitness functions for genetic algorithm and loss functions for gradient descent.

Functions

accuracy_fit(output, target[, default_value])

Fitness function for genetic algorithm using accuracy of a perceptron.

corr_fit(output, target[, default_value])

Fitness function for genetic algorithm using Pearson correlation.

corrsig(output, target[, sigmoid_center, ...])

Loss function for gradient descent using a sigmoid function.

corrsig_fit(output, target[, default_value, ...])

Fitness function for genetic algorithm using correlation and a sigmoid function.

fisher(output, target)

Calculate the negative of the Fisher linear discriminant between two datasets.

fisher_fit(output, target[, default_value])

Fitness function for genetic algorithm using the negative of the Fisher linear discriminant.

get_clamped_intervals(output, mode[, boundaries])

Sort and clamp the data, and find the distances between the datapoints.

pearsons_correlation(x, y)

Measure the Pearson correlation between two sets of data (how much the two sets are linearly related).

sigmoid_nn_distance(output[, target, ...])

Sigmoid of nearest neighbour distance: a squashed version of a sum of all internal distances between points.