Skip to content

REF: Improve terminology around "connection" vs "connectivity" vs "drive" #1148

@asoplata

Description

@asoplata

Problem:

Terminology is ambiguous and confusing around a Network's "connections", and this extends to method names as well.

Context:

I was looking at

net.clear_connectivity()
assert len(net.connectivity) == 4 # 2 drives x 2 target cell types
in the context of #550, and at first I thought there might be a bug with Network.clear_connectivity(). I was surprised to see that this method does not completely clear the net.connectivity data. Instead, it only removes the non-drive members of Connectivity, which in HNN parlance are called "connections". This terminology needs to be changed for the following reasons:

  1. This use of "connections" to refer to only a subset of Connectivity is too confusing IMO. A new user will probably expect that a "connection" is an element in the container of net.connectivity, or something similar. Our existing documentation (such as at https://jonescompneurolab.github.io/textbook/content/08_using_hnn_api/modifying_local_connectivity.html ) doesn't make the term "connection" as clearly distinguished from drive, and sometimes explicitly refers to drive members of Connectivity as connections (which is the opposite use of the word as we use it elsewhere). If you try to read that example page (which is currently the main one that describes how to interact with our connections in detail), and read it from the perspective that you do not know how a connection is different from a drive, it is confusing.

  2. The code is inconsistent with its use: Network.clear_connectivity removes the cell->cell "connections", but does not remove the drives from the connectivity attribute. However, pick_connection (from network.py) DOES return values for drives, in addition to cell->cell "connections", despite being named for connections.

Solution:

It's not a good idea to introduce more differences between drives vs. cell->cell connections in the code just for naming purposes. Instead, I think we should keep the net.connectivity data attribute itself mostly unchanged, but change our documentation and some functions names that interact with it to be more clear. Some options to use, instead of using "connection" to refer to cell->cell members of net.connectivity and "drive" to refer to drive->cell members of net.connectivity:

  • cell_cell_con vs drive_cell_con
  • internal_connection vs external_drive
  • synapse vs drive (even though they're both actually "synapses" ...which is similar to how they're both "connections"...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocumentation, example tutorials, and websitesrefactor

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions