Skip to content

List distance: dist_list.*

cosine

cosine(other: IntoExpr) -> pl.Expr

Returns cosine distance between two lists. Each list is converted to a set.

jaccard_index

jaccard_index(other: IntoExpr) -> pl.Expr

Returns jaccard index between two lists. Each list is converted to a set.

overlap_coef

overlap_coef(other: IntoExpr) -> pl.Expr

Returns overlap coef between two lists. Each list is converted to a set.

sorensen_index

sorensen_index(other: IntoExpr) -> pl.Expr

Returns sorensen index between two lists. Each list is converted to a set.

tversky_index

tversky_index(
    other: IntoExpr, alpha: float, beta: float
) -> pl.Expr

Returns tversky index between two lists. Each list is converted to a set.