tangles.util.graph.similarity#

Functions

cosine_similarity()

Return the cosine similarity matrix of the rows of the matrix data

cosine_similarity_graph_csr_data()

Creates a similarity graph on the data based on cosine similarity between the data points

epsilon_neighborhood_graph()

Creates a neighborhood graph from precomputed distances

grid_distance_graph()

A function to create a grid-like graph where every vertex is connected to all neighbors that are close (in grid coordinates)

hamming_similarity()

The hamming distance, named after Richard Hamming, is a similarity metric measuring the number

image_to_similarity_graph()

Computes a similarity graph for pixels of an image

k_nearest_neighbors()

Creates a k-nearest neighbor graph (or something like a k-nearest neighbor graph) from distances