bluepyemodel.evaluation.fitness_calculator_configuration

FitnessCalculatorConfiguration

Classes

FitnessCalculatorConfiguration([efeatures, ...])

The goal of this class is to store the results of an efeature extraction (efeatures and protocols) or to contain the results of a previous extraction retrieved from an access point.

class FitnessCalculatorConfiguration(efeatures=None, protocols=None, name_rmp_protocol=None, name_rin_protocol=None, threshold_efeature_std=None, default_std_value=0.001, validation_protocols=None, stochasticity=False, ion_variables=None, workflow_id=None)

Bases: object

The goal of this class is to store the results of an efeature extraction (efeatures and protocols) or to contain the results of a previous extraction retrieved from an access point. This object is used for the creation of the fitness calculator.

Init.

The arguments efeatures and protocols are expected to be in the format used for the storage of the fitness calculator configuration. To store the results of an extraction, use the method init_from_bluepyefe.

Parameters:
  • efeatures (list of dict) –

    contains the description of the efeatures of the model in the format returned by the method as_dict of the EFeatureConfiguration class. Each unpacked dict will also act as the input to the EFeatureConfiguration class, details can be found in that class docstring. Below an example:

    [
        {
            "efel_feature_name": "Spikecount",
            "protocol_name": "IDrest_130",
            "recording_name": "soma.v",
            "mean": 6.026,
            "original_std": 4.016,
            "efeature_name": "Spikecount",
            "weight": 1.0,  # optional
            "efel_settings": {
                "strict_stiminterval": true,
                "Threshold": -30.0,
                "interp_step": 0.025,
                "stim_start": 700.0,
                "stim_end": 2700.0
            }
        }
    ]
    

  • protocols (list of dict) –

    contains the description of the protocols of the model in the format returned by the method as_dict of the ProtocolConfiguration class. Each unpacked dict will also act as the input to the ProtocolConfiguration class, details can be found in that class docstring. Below an example:

    [
        {
            "name": "IDrest_130",
            "stimuli": [
                {
                "delay": 663.3473451327434,
                "amp": 0.3491827776582547,
                "thresh_perc": 130.56103157894464,
                "duration": 2053.050884955752,
                "totduration": 3000.0,
                "holding_current": -0.13307330411636328
                }
            ],
            "recordings_from_config": [
                {
                "type": "CompRecording",
                "name": "IDrest_130.soma.v",
                "location": "soma",
                "variable": "v"
                }
            ],
            "validation": false,
            "protocol_type": "ThresholdBasedProtocol",
            "stochasticity": false
        }
    ]
    

  • name_rmp_protocol (str or list) – name and amplitude of protocol whose features are to be used as targets for the search of the RMP. e.g: ["IV", 0] or "IV_0"

  • name_rin_protocol (str or list) – name and amplitude of protocol whose features are to be used as targets for the search of the Rin. e.g: ["IV", -20] or "IV_-20"

  • threshold_efeature_std (float) –

    lower limit for the std expressed as a percentage of

    the mean of the features value (optional). Legacy.

    default_std_value (float): during and after extraction, this value will be used

    to replace the standard deviation if the standard deviation is 0.

  • validation_protocols (list of str) – name of the protocols used for validation only.

  • stochasticity (bool or list of str) – should channels behave stochastically if they can. If a list of protocol names is provided, the runs will be stochastic for these protocols, and deterministic for the other ones.

  • ion_variables (list of str) – ion current names and ionic concentration anmes for all available mechanisms

  • workflow_id (str) – EModelWorkflow id on nexus.

as_dict()

Used for the storage of the configuration

check_stochasticity(protocol_name)

Check if stochasticity should be active for a given protocol

init_from_bluepyefe(efeatures, protocols, currents, threshold_efeature_std, protocols_mapping=None)

Fill the configuration using the output of BluePyEfe

initialise_efeatures(efeatures, threshold_efeature_std=None, default_std_value=0.001)

Initialise efeatures from the FitnessCalculatorConfiguration format.

initialise_protocols(protocols)

Initialise protocols from the FitnessCalculatorConfiguration format.

remove_featureless_protocols()

Remove the protocols that do not have any matching efeatures