- navis.persistence_distances(q, t=None, augment=True, normalize=True, bw=0.2, **persistence_kwargs)¶
Calculate morphological similarity using persistence diagrams.
- This works by:
Generate persistence points for each neuron.
Create a weighted Gaussian from persistence points and sample 100 evenly spaced points to create a feature vector.
Calculate Euclidean distance.
q/t (NeuronList) – Queries and targets, respectively. If
t=Nonewill run queries against queries. Neurons should have the same units, ideally nanometers.
normalize (bool) – If True, will normalized the vector for each neuron to be within 0-1. Set to False if the total number of linear segments matter.
bw (float) – Bandwidth for Gaussian kernel: larger = smoother, smaller = more detailed.
augment (bool) – Whether to augment the persistence vectors with other neuron properties (number of branch points & leafs and cable length).
**persistence_kwargs – Keyword arguments are passed to
- Return type: