jaccard_treeharp: Computes Jaccard Index

Description Usage Arguments Details Value

View source: R/tree_kernel.R

Description

Computes the Jaccard index between two trees.

Usage

1
jaccard_treeharp(th1, th2, weighted = FALSE)

Arguments

th1

A TreeHarp object.

th2

A TreeHarp object.

weighted

A logical value, indicating if the weighted Jaccard similarity should be computed.

Details

The unweighted form is just the cardinality of the intersection of the two sets of tokens, divided by the union of the two sets.

The weighted form is described on the WIkipedia page: https://en.wikipedia.org/wiki/Jaccard_index#Weighted_Jaccard_similarity_and_distance

Value

A real number between 0 and 1.


autoharp documentation built on Nov. 13, 2021, 1:06 a.m.