MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / scaled_similarity

Function scaled_similarity

experiments/baselines/knowledge_entity/runner.py:277–278  ·  view source on GitHub ↗
(left: Dict[str, float], right: Dict[str, float])

Source from the content-addressed store, hash-verified

275
276
277def scaled_similarity(left: Dict[str, float], right: Dict[str, float]) -> float:
278 return clamp(cosine(left, right) * 4.0)
279
280
281def jaccard(left: set[str], right: set[str]) -> float:

Callers 3

multifacet_similarityFunction · 0.70
profile_entity_scoreFunction · 0.70
history_entity_scoreFunction · 0.70

Calls 2

clampFunction · 0.70
cosineFunction · 0.70

Tested by

no test coverage detected