pub struct VCDimension {
pub dim: usize,
}Expand description
VC dimension and growth function calculations.
Fields§
§dim: usizeThe claimed VC dimension.
Implementations§
Source§impl VCDimension
impl VCDimension
Sourcepub fn sauer_shelah_bound(&self, m: usize) -> usize
pub fn sauer_shelah_bound(&self, m: usize) -> usize
Sauer-Shelah bound: Π_H(m) ≤ Σ_{i=0}^{d} C(m,i).
Sourcepub fn can_shatter(&self, m: usize) -> bool
pub fn can_shatter(&self, m: usize) -> bool
Check if d-dimensional threshold classifier can shatter m points.
For the canonical 1D threshold classifier H = {h_θ : θ ∈ ℝ}, VC dim = 1. This checks whether the bound is consistent with shattering.
Sourcepub fn fundamental_theorem_pac(&self) -> bool
pub fn fundamental_theorem_pac(&self) -> bool
Fundamental theorem of PAC learning: finite VC dim ↔ PAC learnability.
Auto Trait Implementations§
impl Freeze for VCDimension
impl RefUnwindSafe for VCDimension
impl Send for VCDimension
impl Sync for VCDimension
impl Unpin for VCDimension
impl UnsafeUnpin for VCDimension
impl UnwindSafe for VCDimension
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