calc_dist_ratio: Calculate the distance (OSA) ratio from distance and max...

Description Usage Arguments Value See Also

View source: R/str_distances.R

Description

Raw string edit distances are of limited use because differences in the lengths of compared strings drives the distribution of expected distances. The raw edit distances are normalized by element-wise division of the OSA distance by the maximum possible distance (sum of compared string lengths). Identical strings have a ratio of 0, completely different strings == 1.

Usage

1
calc_dist_ratio(dists, maxes)

Arguments

dists

A matrix of string edit distances (OSA)

maxes

A matrix of maximum possible string edit distances

Value

A matrix of edit distance ratios

See Also

get_max_dist


jacob-ogre/hcphb documentation built on May 18, 2019, 8:01 a.m.