neuron_morphology.feature_extractor.run_feature_extraction module¶
-
neuron_morphology.feature_extractor.run_feature_extraction.hydrate_parameters(parameters: Dict[str, Any]) → Dict[str, Any][source]¶ Resolve argued feature parameters to a format comprehensible by the features. e.g. loading data from a path.
Parameters: - parameters : to be hydrated
Returns: - The hydrated parameters
-
neuron_morphology.feature_extractor.run_feature_extraction.resolve_reference_layer_depths(key=None, names=None, boundaries=None)[source]¶ Given either the name of a well known depths set or a set of names and corresponding boundaries, produce a ReferenceLayerDepths
Parameters: - key : of a well known reference layer
- names : the names of each layer in a custom sequence
- boundaries : the upper and lower depths of each layer in a custom sequence
Returns: - the requested reference layer depths
-
neuron_morphology.feature_extractor.run_feature_extraction.run_feature_extraction(reconstruction_spec: Dict[str, Any], feature_set: str, only_marks: List[str], required_marks: List[str], global_parameter_spec: Dict[str, Any]) → Tuple[str, Dict][source]¶ Run feature extraction for a single reconstruction.
Parameters: - reconstruction_spec : a dictionary specifying a reconstruction. Must
have an swc_path.
- feature_set : names the set of features for which calculation will be
attempted
- only_marks : names marks to which calculation will be restricted
- required_marks : raise an exception if these named marks fail validation
- global_parameter_spec : a dictionary specifying cross-reconstruction
parameters
Returns: - identifier : a label for this reconstruction
- A dict with keys:
results - a dict, mapping features to calculated values selected_marks - the set of marks that passed validation selected features - the set of features for which calculation was
attempted
-
neuron_morphology.feature_extractor.run_feature_extraction.setup_data(reconstruction: Dict[str, Any], global_parameters: Dict[str, Any]) → Tuple[str, neuron_morphology.feature_extractor.data.Data][source]¶ Construct a Data for extracting features from a single reconstruction.
Parameters: - reconstruction : The reconstruction to be setup. Must specify an swc_path
- global_parameters : any cross-reconstruction feature parameters
Returns: - identifier : a label for this reconstruction
- data suitable for feature extraction