neuron_morphology.feature_extractor.feature_extraction_run module

class neuron_morphology.feature_extractor.feature_extraction_run.FeatureExtractionRun(data)[source]

Bases: object

Methods

extract(self) For each selected feature, carry out calculation on this run’s dataset.
select_features(self, features, only_marks, …) Choose features to calculated for this run on the basis of selected marks.
select_marks(self, marks, required_marks) Choose marks for this run by validating a set of candidates against the data.
serialize(self) Return a dictionary describing this run
extract(self)[source]

For each selected feature, carry out calculation on this run’s dataset.

Returns:
self : This FeatureExtractionRun, with results updated
select_features(self, features: Collection[neuron_morphology.feature_extractor.marked_feature.MarkedFeature], only_marks: Union[AbstractSet[Type[neuron_morphology.feature_extractor.mark.Mark]], NoneType] = None)[source]

Choose features to calculated for this run on the basis of selected marks.

Parameters:
features : Candidates features for selection
only_marks : if provided, reject features not marked with marks in

this set

Returns:
self : This FeatureExtractionRun, with selected_features updated
select_marks(self, marks: Collection[Type[neuron_morphology.feature_extractor.mark.Mark]], required_marks: AbstractSet[Type[neuron_morphology.feature_extractor.mark.Mark]] = frozenset())[source]

Choose marks for this run by validating a set of candidates against the data.

Parameters:
marks : candidate marks to be validated
required_marks : if provided, raise an exception if any of these marks

do not validate successfully

Returns:
self : This FeatureExtractionRun, with selected_marks updated
serialize(self)[source]

Return a dictionary describing this run