Description
Sum nonnegative weights only for comparable positions as normalizer and count all true comparable flags as supportedPositions.
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.
Sum nonnegative weights only for comparable positions as normalizer and count all true comparable flags as supportedPositions.
When to use this tool
Use Mismatch Weight Normalizer 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 weights, comparable. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read normalizer, supportedPositions. Use the output convention below.
Sum nonnegative weights only for comparable positions as normalizer and count all true comparable flags as supportedPositions. Require aligned arrays.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| weights | Weights | Required. Array of finite number; minimum 0; maximum items 256. |
| comparable | Comparable | Required. Array of boolean; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| normalizer | Normalizer | Required. Finite number. |
| supportedPositions | Count of comparable positions, including zero-weight entries. | Required. Safe integer. |
{
"input": {
"weights": [
1,
2,
3
],
"comparable": [
true,
false,
true
]
},
"output": {
"normalizer": 4,
"supportedPositions": 2
}
} Limitations and assumptions
- SupportedPositions includes zero-weight positions. A zero normalizer can occur with nonempty support, so inspect it before using this term as a denominator; no mismatch score is calculated.
- 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
- Similarity: Edit Score Length Normalizer Choice
Normalize a supplied edit count by explicitly selected max/sum/mean string length, retaining undefined status for empty pairs without claiming a bounded similarity.
- Hamming Similarity Length Mismatch Policy
Normalize mismatches by the greater length, adding the length difference as errors only when padMissing.