- navis.persistence_distances(q, t=None, scores='mean', augment=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.
scores ("forward" | "reverse" | "mean") –
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: