connectome-neuprint / neuprint-python

Python client utilties for interacting with the neuPrint connectome analysis service
BSD 3-Clause "New" or "Revised" License
31 stars 16 forks source link

Options for high-precision connections #25

Open stuarteberg opened 3 years ago

stuarteberg commented 3 years ago

Neuron-neuron connections in neuprint have a weight attribute and a weightHP attribute for "high precision" synapses. Functions in neuprint-python that use edge weights should include an option to use the latter attribute if the user wants to use only high-precision connections.

unidesigner commented 3 years ago

What is the difference between a weight and weightHP synapse?

stuarteberg commented 3 years ago

What is the difference between a weight and weightHP synapse?

Each synapse has an associated "confidence" indicating roughly how likely the synapse is real (vs. a false prediction). These can be inspected in the output of fetch_synapses() and fetch_synapse_connections().

But that's only helpful if you're inspecting individual synapse properties. The overall neuron-to-neuron connection strength is precomputed and stored in the :ConnectsTo edge relationship, as the weight attribute. It counts all synapses. If you're interested in a higher precision (but lower recall) version of the edge strength, you can use weightHP. It's also precomputed, but only counts synapses which exceed a minimum confidence score.

In general, the "high precision" threshold could be different from one dataset to the next. In the hemibrain, I believe it is 0.7.

unidesigner commented 3 years ago

Thanks for the explanation.