Skip to main content

SimilarityConverterConfig

Configuration for converting cosine similarity scores to percentage-based similarity.

type SimilarityConverterConfig = {
threshold: number;
middleScore: number;
steepness: number;
outputMin: number;
outputMax: number;
};

Properties

PropertyTypeDescription
thresholdnumberCosine similarity threshold for determining face matches (typically around 0.42)
middleScorenumberReference value for percentage conversion (typically 0.5 or 0.6)
steepnessnumberControls the steepness of the conversion curve (typically around 8.0)
outputMinnumberMinimum value of the output range (typically 0.01)
outputMaxnumberMaximum value of the output range (typically 1.0)