similarity

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JaccardSimilarity

func JaccardSimilarity[T constraints.Ordered](a, b []T) float64

JaccardSimilarity calculates the Jaccard similarity by sorting the input slices, deduplicating them, and then using a two-pointer approach to find the intersection. This function uses generics to handle any comparable type.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL