Skip to contents

Normalize similarity scores

Usage

norm_sim(similarities)

Arguments

similarities

A numeric vector of similarity scores

Value

A numeric vector of normalized similarity scores

Details

This function normalizes similarity scores to a 0-1 range.

Examples

similarities <- c(0.2, 0.5, 0.8, 1.0, 0.3)
norm_sim(similarities)
#> [1] 0.000 0.375 0.750 1.000 0.125