Closed mrwunderbar666 closed 1 year ago
Find similar entries based on what they have in common.
Example query for calculating jaccard similarity between datasets:
{ var(func: has(sources_included)) { D2_num_sources as count(sources_included) } var(func: uid(0x149fb920)) { name D1_num_sources as count(sources_included) v as sources_included { ~sources_included { intersection as count(sources_included, @filter(uid(v))) distance as math(1 - (intersection / (1.0 * D1_num_sources + 1.0 * D2_num_sources) )) # 1.0 is required to cast int to floats } } } similarDatasets(func: uid(distance), orderasc: val(distance), first: 10) { name uid common_items: val(intersection) d: val(distance) } }
Find similar entries based on what they have in common.
Example query for calculating jaccard similarity between datasets: