pub struct BimodalDetector { /* private fields */ }Expand description
二峰性検出エンジン。
Implementations§
Source§impl BimodalDetector
impl BimodalDetector
Sourcepub fn new(config: BimodalConfig) -> Self
pub fn new(config: BimodalConfig) -> Self
新規 BimodalDetector を生成する。
Sourcepub fn config(&self) -> &BimodalConfig
pub fn config(&self) -> &BimodalConfig
設定への参照を取得する。
Sourcepub fn count_local_peaks(probabilities: &[f64]) -> usize
pub fn count_local_peaks(probabilities: &[f64]) -> usize
確率分布の局所極大値 (ピーク) の個数を $O(M)$ で走査・カウントする。
端点 ($k=0, M-1$) および内部の極大値を検出し、単峰性 (単調増加・単調減少・中央山型) と 意見二極化 (2 箇所以上のピーク) を幾何学的に識別する。
Sourcepub fn detect(&self, probabilities: &[f64]) -> Result<BimodalReport>
pub fn detect(&self, probabilities: &[f64]) -> Result<BimodalReport>
確率分布スライスを検査し、二峰性レポートを生成する。
§判定基準 (ハイブリッド判定)
- 段階数が
min_categories以上であること。 - 確率分布の局所ピーク数が 2 箇所以上存在すること (単調推移や単一山型を排除)。
- 双峰性係数 $BC > \text{bc_threshold}$ (一様分布水準 0.555 を超過)。
- 分散比率 $\text{VarRatio} > \text{var_ratio_threshold}$ (理論最大分散の 35% 以上)。
Trait Implementations§
Source§impl Clone for BimodalDetector
impl Clone for BimodalDetector
Source§fn clone(&self) -> BimodalDetector
fn clone(&self) -> BimodalDetector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BimodalDetector
impl Debug for BimodalDetector
Auto Trait Implementations§
impl Freeze for BimodalDetector
impl RefUnwindSafe for BimodalDetector
impl Send for BimodalDetector
impl Sync for BimodalDetector
impl Unpin for BimodalDetector
impl UnsafeUnpin for BimodalDetector
impl UnwindSafe for BimodalDetector
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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