pub struct BridgeConfig {
pub threshold_base: f64,
pub threshold_evr_penalty: f64,
pub overlap_artifact_territorial: f64,
pub balanced_affinity_quantile: f64,
pub min_evr_for_classification: f64,
}Expand description
Parameters controlling bridge detection and classification.
Fields§
§threshold_base: f64Constant term in the EVR-adaptive bridge threshold
threshold = threshold_base + (1 − evr)² · threshold_evr_penalty.
threshold_evr_penalty: f64EVR-penalty coefficient in the bridge threshold formula.
overlap_artifact_territorial: f64Percentile of the observed territorial factor distribution below
which a bridge is classified as OverlapArtifact rather than
Genuine or Weak. 0.3 = the bottom 30 % of bridge pairs by
territorial separation are labeled artifacts. Expressed as a
percentile so that dense corpora (where all exclusivities collapse
toward zero) do not classify every bridge as an artifact.
balanced_affinity_quantile: f64Quantile of the home-affinity distribution that sets the
genuine-bridge floor. For each member item, “home affinity” is
the cosine similarity between the item’s embedding and its own
category’s centroid. A bridge is classified Genuine when
min(affinity_to_source, affinity_to_target) exceeds the
quantile-q of those home affinities; otherwise Weak.
Why a quantile and not an absolute cosine: home affinity scale
varies with the projection layout. After stratified PCA spreads
imbalanced corpora, home affinities can drop into the 0.3–0.6
band where a fixed 0.5 cosine floor labels almost every cross-
domain item Weak. A quantile-based floor adapts to the
corpus’s own affinity scale: tight corpora get a strict floor,
spread ones get a permissive one, without per-corpus tuning.
Smaller q = stricter (only bridges matching the strongest
home affinities qualify). Larger q = more permissive. Default
0.25: a bridge is Genuine if it has at least as much
affinity to both sides as the bottom-25% of items have to
their own home category.
min_evr_for_classification: f64EVR below which bridge classification is unreliable. When the
outer projection’s EVR is below this threshold, all bridges
are labeled Weak (honest uncertainty) rather than attempting
territorial-factor-based classification — which collapses to
100% OverlapArtifact when caps overlap everywhere on a
low-EVR projection, flattening the tuner landscape. Default
0.20.
Implementations§
Source§impl BridgeConfig
impl BridgeConfig
Sourcepub fn evr_adaptive_threshold(&self, evr: f64) -> f64
pub fn evr_adaptive_threshold(&self, evr: f64) -> f64
EVR-adaptive bridge threshold.
Higher EVR → looser threshold (projection is more trustworthy). At EVR=0.19: 0.5 + 0.81² × 0.4 = 0.76 (strict). At EVR=0.90: 0.5 + 0.01 × 0.4 = 0.50 (essentially unchanged).
Trait Implementations§
Source§impl Clone for BridgeConfig
impl Clone for BridgeConfig
Source§fn clone(&self) -> BridgeConfig
fn clone(&self) -> BridgeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BridgeConfig
impl Debug for BridgeConfig
Source§impl Default for BridgeConfig
impl Default for BridgeConfig
Source§impl<'de> Deserialize<'de> for BridgeConfigwhere
BridgeConfig: Default,
impl<'de> Deserialize<'de> for BridgeConfigwhere
BridgeConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for BridgeConfig
impl RefUnwindSafe for BridgeConfig
impl Send for BridgeConfig
impl Sync for BridgeConfig
impl Unpin for BridgeConfig
impl UnsafeUnpin for BridgeConfig
impl UnwindSafe for BridgeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more