nx_flavor_pairing.nx
buildroot/runtime/nx_flavor_pairing.nx
about
nx_flavor_pairing.nx -- T4 of the TASTE-SCIENCE ladder: the FLAVOR
NETWORK. Ahn, Ahnert, Bagrow & Barabasi (2011, "Flavor network and
the principles of food pairing") showed that ingredient pairing can be
computed from the aroma compounds two ingredients SHARE -- a data-
driven affinity, not a chef's opinion.
The baseline nx_food_science carries a HAND-LISTED affinity table
(beef-oyster = 9, ...): finite, and silent on any pair nobody typed in.
T4 computes affinity from each ingredient's compound set, so it scores
ANY pair -- including a novel ingredient that has never been in a table.
shared(A,B) = |compounds(A) INTERSECT compounds(B)|
affinity(A,B) = Jaccard = 1000 * shared / |A UNION B| (milli)
MEASURED EXCEED (gate-checked): a fruity pair that shares esters scores
above a fruit+allium pair that shares none, identical sets score 1000,
and a NOVEL ingredient gets a real affinity computed from its compounds.
genealogy_id: ahn_2011_flavor_network + jaccard_1901_similarity
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_flavor_pairing_test.nx
structs
| 24 | struct NxCompoundSet |
consts
| none |
functions
| 30 | func nx_compoundset_new(n: i64) -> *NxCompoundSet |
| 38 | func nx_pairing_shared(a: *NxCompoundSet, b: *NxCompoundSet) -> i64 |
| 57 | func nx_pairing_affinity_milli(a: *NxCompoundSet, b: *NxCompoundSet) -> i64 |
| 68 | func nx_compounds_strawberry() -> *NxCompoundSet |
| 79 | func nx_compounds_pineapple() -> *NxCompoundSet |
| 89 | func nx_compounds_garlic() -> *NxCompoundSet |
| 97 | func nx_compounds_roastbeef() -> *NxCompoundSet |