histogram_intersection

histogram_intersection(first, second)[source]

Find the distance between two histograms using the histogram intersection.

This distance function is designed for sparse matrix, represented as a dictionary or numba Dict, but can accept arrays.

Parameters:
firstdict, numba.Dict or array

First dictionary used in distance measurement.

seconddict, numba.Dict or array

Second dictionary that will be used to measure distance from first.

Returns:
float

The histogram intersection distance between the first and second dictionaries.