CompositeOptions class

Configuration for the composite (calibrated ensemble) algorithm.

The composite combines several witness metrics (Jaro-Winkler, Dice, Cosine, Overlap) into one stable score. Each witness is first remapped through a per-witness noise floor so the witnesses become comparable:

scaled = clamp01((raw - floor) / (1 - floor))   // raw <= floor maps to 0

The default floors were derived empirically (the 95th percentile of each witness's score on unrelated word pairs); see benchmark/composite_calibration.dart to re-derive them.

Constructors

CompositeOptions({CompositeCombiner combiner = CompositeCombiner.scaledMax, double jaroWinklerWeight = 1.0, double diceWeight = 1.0, double cosineWeight = 0.95, double overlapWeight = 0.9, double jaroWinklerFloor = 0.63, double diceFloor = 0.22, double cosineFloor = 0.0, double overlapFloor = 0.07})
Creates a CompositeOptions.
const

Properties

combiner CompositeCombiner
How witness scores are combined into the final score.
final
cosineFloor double
Noise floor for the Cosine witness (default: 0.0, empirical).
final
cosineWeight double
Trust weight for the Cosine witness (token / word reordering).
final
diceFloor double
Noise floor for the Dice witness (default: 0.22, empirical).
final
diceWeight double
Trust weight for the Dice witness (character bigram overlap).
final
hashCode int
The hash code for this object.
no setterinherited
jaroWinklerFloor double
Noise floor for the Jaro-Winkler witness (default: 0.63, empirical).
final
jaroWinklerWeight double
Trust weight for the Jaro-Winkler witness (typos / shared prefix).
final
overlapFloor double
Noise floor for the Overlap witness (default: 0.07, empirical).
final
overlapWeight double
Trust weight for the Overlap witness (containment / length disparity).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({CompositeCombiner? combiner, double? jaroWinklerWeight, double? diceWeight, double? cosineWeight, double? overlapWeight, double? jaroWinklerFloor, double? diceFloor, double? cosineFloor, double? overlapFloor}) CompositeOptions
Creates a copy of this object with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate() → void
Runtime validation helper. Throws InvalidConfigurationException when weights are negative/non-finite or floors fall outside [0.0, 1.0).

Operators

operator ==(Object other) bool
The equality operator.
inherited