morphoclass.transforms.global_features package

Module contents

Global feature extractors.

All transforms in this submodule should modify the data.u attribute

class morphoclass.transforms.global_features.AbstractGlobalFeatureExtractor

Bases: abc.ABC

A morphology data transform for global feature extraction.

abstract extract_global_feature(data)

Extract a particular global feature.

Child classes should implement this function.

Parameters

data – A morphology data sample.

Returns

Return type

The value of the global feature for the given data sample.

class morphoclass.transforms.global_features.AverageBranchOrder(tree_hash_fn=None)

Bases: morphoclass.transforms.global_features.abstract_global_feature_extractor.AbstractGlobalFeatureExtractor

Extract average branch order.

Branch order is defined as the number of branching points one passes going from the leafs to the root. Thus the root point has branching order 0

The data should contain the field tmd_neurites, see the ExtractTMDNeurites class.

extract_global_feature(data)

Extract the average branch order global feature from data sample.

Parameters

data – A morphology data sample.

Returns

The average branch order of the morpholgy.

Return type

float

class morphoclass.transforms.global_features.AverageRadius(tree_hash_fn=None, from_morphology=False)

Bases: morphoclass.transforms.global_features.abstract_global_feature_extractor.AbstractGlobalFeatureExtractor

Extract average radius across all apicals.

The data should contain the field tmd_neurites, see the ExtractTMDNeurites class.

extract_global_feature(data)

Extract the average radius global feature from data.

Parameters

data – The input morphology.

Returns

Return type

The average radius of the morphology.

class morphoclass.transforms.global_features.ExtractMaximalApicalPathLength(tree_hash_fn=None)

Bases: morphoclass.transforms.global_features.abstract_global_feature_extractor.AbstractGlobalFeatureExtractor

Extract maximal neurite length.

Maximal path distance form soma to a tip (leaf node)

The data should contain the field tmd_neurites, see the ExtractTMDNeurites class.

extract_global_feature(data)

Extract the maximal apical length global feature from data.

Parameters

data – The input morphology.

Returns

Return type

The maximal apical length of the morphology.

class morphoclass.transforms.global_features.ExtractNumberBranchPoints

Bases: morphoclass.transforms.global_features.abstract_global_feature_extractor.AbstractGlobalFeatureExtractor

Extract number of branch points.

The data should contain the field tmd_neurites, see the ExtractTMDNeurites class.

extract_global_feature(data)

Extract the number of branch points global feature from data.

Parameters

data – The input morphology.

Returns

Return type

The number of branch points in the morphology.

class morphoclass.transforms.global_features.ExtractNumberLeaves

Bases: morphoclass.transforms.global_features.abstract_global_feature_extractor.AbstractGlobalFeatureExtractor

Extract number of leaf nodes.

The data should contain the field tmd_neurites, see the ExtractTMDNeuritess class.

extract_global_feature(data)

Extract the number of leaf nodes of the morphology.

Parameters

data – A morphology data sample.

Returns

Return type

The total number of leaf nodes of the morphology.

class morphoclass.transforms.global_features.TotalPathLength(tree_hash_fn=None, from_morphology=False)

Bases: morphoclass.transforms.global_features.abstract_global_feature_extractor.AbstractGlobalFeatureExtractor

Extract total path length of the apical.

The data should contain the field tmd_neurites, see the ExtractTMDNeurites class.

extract_global_feature(data)

Extract the total path length global feature from data sample.

Parameters

data – A morphology data sample.

Returns

Return type

The total path length of the morphology.