navis 1.4.0
  • Install
  • Quickstart
  • Tutorials
  • API
  • Changelog
  • Github
  • Ecosystem
  • Site
    • Page
        • navis.persistence_distances
          • persistence_distances()

    navis.persistence_distances¶

    navis.persistence_distances(q, t=None, scores='mean', augment=True, bw=0.2, **persistence_kwargs)[source]¶

    Calculate morphological similarity using persistence diagrams.

    This works by:
    1. Generate persistence points for each neuron.

    2. Create a weighted Gaussian from persistence points and sample 100 evenly spaced points to create a feature vector.

    3. Calculate Euclidean distance.

    Parameters:
    • q/t (NeuronList) – Queries and targets, respectively. If t=None will 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 navis.persistence_points().

    Returns:

    distances

    Return type:

    pandas.DataFrame

    See also

    navis.persistence_points()

    The function to calculate the persistence points.

    navis.persistence_vectors()

    Use this to get and inspect the actual vectors used here.

    Back to top

    Source

    © Copyright 2018, Philipp Schlegel.
    Created using Sphinx 5.3.0.