Skip to content

Suggestion for variable name changes #2

@patrick-nicodemus

Description

@patrick-nicodemus

First, thank you very much for this useful port!

I am currently working on a project where I am reading and modifying your source code and I find it difficult to read because you use the term "distance", "dist", etc at several points, a number of the variables are called dist with some prefix. There are messages printed to the user that say "Computing weighted distances..."

But what the paper constructs is a similarity score between two cells, not a distance. The "nearest neighbors" are the points with the greatest weighted similarity, so points that are "further away" are more similar. This leads to confusing code where you select the "top nearest neighbors" by identifying the points that are furthest away in the space (greatest distance)

Names are not a huge deal but the basic practical problem is that it makes it more difficult to reason about the code and do common-sense sanity checks for modifications when the variable is named the opposite of what it actually is. I think the code can be more maintainable if these variables are renamed.

I propose to modify the code to replace the term "distance" with "similarity" or "similarity_metric" in several points as appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions