roiextract.filter.dot#
- roiextract.filter.dot(sf1, sf2, normalize=True)#
Compute the dot product / cosine similarity of two spatial filters.
- Parameters:
- sf1
SpatialFilter The first spatial filter.
- sf2
SpatialFilter The second spatial filter.
- normalizebool, default=True
If True (default), calculate the cosine similarity by dividing over the norms of the spatial filters.
- sf1
- Returns:
- dp
float The value of the dot product / cosine similarity.
- dp