Description
Compare swapping the asymmetry weights of one supplied Tversky overlap.
A similarity term depends on the comparison universe, missing-value policy, treatment of repeated features, and normalization. A score can also have a caller-selected value when its mathematical denominator vanishes. Those conventions matter before interpreting a threshold or comparing methods.
Compare swapping the asymmetry weights of one supplied Tversky overlap.
When to use this tool
Use Tversky Alpha Beta Swap Gap when you need this particular comparison term, normalization, domain condition, or empty-result policy in a larger matching workflow.
How to use the tool and how it works
- Enter intersection, firstOnly, secondOnly, alpha, beta. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read forward, swapped, gap. Use the output convention below.
Calculate forward with alpha*firstOnly+beta*secondOnly and swapped with beta*firstOnly+alpha*secondOnly, then gap=forward-swapped. Require nonnegative inputs and both denominators positive.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| intersection | Intersection | Required. Finite number; minimum 0. |
| firstOnly | First Only | Required. Finite number; minimum 0. |
| secondOnly | Second Only | Required. Finite number; minimum 0. |
| alpha | Alpha | Required. Finite number; minimum 0. |
| beta | Beta | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| forward | Forward | Required. Finite number. |
| swapped | Swapped | Required. Finite number. |
| gap | Gap | Required. Finite number. |
{
"input": {
"intersection": 2,
"firstOnly": 1,
"secondOnly": 3,
"alpha": 1,
"beta": 2
},
"output": {
"forward": 0.2222222222222222,
"swapped": 0.2857142857142857,
"gap": -0.06349206349206349
}
} Limitations and assumptions
- Only penalties are exchanged while feature-side counts stay fixed. This differs from reversing sets together with penalties and does not establish a symmetric metric.
- The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Signed zero is exported as zero.
Alternative or Complementary methods
Compare methods only after aligning feature definitions, missingness, empty policies, multiplicities, and normalizers. Use a complete comparison when the tool returns only one contribution or count check.
References
Similar or alternative tools
- Tversky Parameter Swap Duality
Calculate intersection/(intersection+alpha*leftOnly+beta*rightOnly) and return that value as both forward and reverseWithSwappedWeights.
- Tversky One Sided Penalty Parameter
Calculate Tversky score and alphaDerivative=-intersection*firstOnly/denominator² from denominator=intersection+alpha*firstOnly+beta*secondOnly.