ajustador.fitnesses¶
-
class
ajustador.fitnesses.
WaveHistogram
(wave1, wave2, left=-inf, right=inf)[source]¶ Compute the difference between cumulative histograms of two waves
Since the x step might be different, we need to scale to the same range. This is done by doing a frequency histogram, which abstracts away the number of points in either plot.
-
ajustador.fitnesses.
ahp_curve_compare
(cut1, cut2)[source]¶ Returns a number from [0, 1] which compares how close they are.
0 means the same, 1 means very different.
-
ajustador.fitnesses.
ahp_curve_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
baseline_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶ Similarity of baselines
-
ajustador.fitnesses.
baseline_post_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶ Similarity of baselines
-
ajustador.fitnesses.
baseline_pre_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶ Similarity of baselines
-
ajustador.fitnesses.
charging_curve_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
class
ajustador.fitnesses.
combined_fitness
(preset='new_combined_fitness', *, error=<ErrorCalc.relative: 2>, extra=None, **kwargs)[source]¶ Basic weighted combinations of fitness functions
-
presets
= {'empty': OrderedDict(), 'new_combined_fitness': OrderedDict([('response', 1), ('baseline_pre', 1), ('baseline_post', 1), ('rectification', 1), ('falling_curve_time', 1), ('spike_time', 1), ('spike_width', 1), ('spike_height', 1), ('spike_latency', 1), ('spike_ahp', 1), ('ahp_curve', 1), ('spike_range_y_histogram', 1)]), 'simple_combined_fitness': OrderedDict([('response', 1), ('baseline', 1), ('rectification', 1), ('falling_curve_time', 1), ('mean_isi', 1), ('spike_latency', 1), ('spike_height', 1), ('spike_width', 1), ('spike_ahp', 1), ('spike_count', 1), ('isi_spread', 1)])}¶
-
-
ajustador.fitnesses.
falling_curve_time_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
find_multi_best
(group, measurement, fitness, similarity=0.1, debug=False, full=False)[source]¶
-
class
ajustador.fitnesses.
find_nonsimilar_result
(group, scores, params)¶ -
group
¶ Alias for field number 0
-
params
¶ Alias for field number 2
-
scores
¶ Alias for field number 1
-
-
ajustador.fitnesses.
hyperpol_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
isi_spread_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
mean_isi_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
parametrized_fitness
(response=1, baseline=0.3, rectification=1, falling_curve_param=1, mean_isi=1, spike_latency=1, spike_height=1, spike_width=1, spike_ahp=1, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
rectification_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
relative_diff
(a, b)[source]¶ A difference between a and b using b as the yardstick
\[W = |a - b| / (|b| + |a| * RELATIVE_MAX_RATIO) w = rms(W)\]
-
ajustador.fitnesses.
response_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶ Similarity of response to hyperpolarizing injection
-
ajustador.fitnesses.
spike_ahp_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
spike_count_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
spike_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
spike_fitness_0
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
spike_height_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
spike_latency_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶
-
ajustador.fitnesses.
spike_range_y_histogram_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶ Match histograms of y-values in spiking regions
This returns an rms of
WaveHistogram.diff
over the injection region. Waves are filtered to have at at least one spike between the pair. This is done to make this fitness function sensitive to depolarization block. Otherwise, the result would be dominated by baseline mismatches and response mismatches.baseline_post_fitness
andresponse_fitness
are better fitted to detect mismatches in other regions.
-
ajustador.fitnesses.
spike_time_fitness
(sim, measurement, full=False, error=<ErrorCalc.relative: 2>)[source]¶