pub struct TypedArray<T, M, S> { /* private fields */ }Expand description
Type-safe wrapper for arrays with compile-time missing data mechanism tracking
Implementations§
Source§impl<T: Clone + PartialEq> TypedArray<T, UnknownMechanism, Complete>
impl<T: Clone + PartialEq> TypedArray<T, UnknownMechanism, Complete>
Sourcepub fn new_complete(data: Array2<T>) -> Self
pub fn new_complete(data: Array2<T>) -> Self
Create a new complete array from ndarray
Source§impl<T: Clone + PartialEq> TypedArray<T, UnknownMechanism, WithMissing>
impl<T: Clone + PartialEq> TypedArray<T, UnknownMechanism, WithMissing>
Sourcepub fn new_with_missing(data: Array2<T>, missing_mask: Array2<bool>) -> Self
pub fn new_with_missing(data: Array2<T>, missing_mask: Array2<bool>) -> Self
Create a new array with missing values from ndarray
Source§impl<T: Clone + PartialEq> TypedArray<T, MCAR, WithMissing>
impl<T: Clone + PartialEq> TypedArray<T, MCAR, WithMissing>
Sourcepub fn new_with_missing(data: Array2<T>, missing_mask: Array2<bool>) -> Self
pub fn new_with_missing(data: Array2<T>, missing_mask: Array2<bool>) -> Self
Create a new MCAR array with missing values from ndarray
Source§impl<T, M, S> TypedArray<T, M, S>
impl<T, M, S> TypedArray<T, M, S>
Sourcepub fn missing_mask(&self) -> Option<&Array2<bool>>
pub fn missing_mask(&self) -> Option<&Array2<bool>>
Get the missing mask if available
Source§impl<T: Clone + PartialEq> TypedArray<T, UnknownMechanism, WithMissing>
impl<T: Clone + PartialEq> TypedArray<T, UnknownMechanism, WithMissing>
Sourcepub fn classify_mechanism(self) -> SklResult<ClassifiedArray<T>>
pub fn classify_mechanism(self) -> SklResult<ClassifiedArray<T>>
Classify the missing data mechanism and return typed array
Trait Implementations§
Source§impl<T: Clone, M: Clone, S: Clone> Clone for TypedArray<T, M, S>
impl<T: Clone, M: Clone, S: Clone> Clone for TypedArray<T, M, S>
Source§fn clone(&self) -> TypedArray<T, M, S>
fn clone(&self) -> TypedArray<T, M, S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> MissingPatternValidator<MAR> for TypedArray<T, MAR, WithMissing>
impl<T> MissingPatternValidator<MAR> for TypedArray<T, MAR, WithMissing>
fn validate_assumptions(&self) -> SklResult<()>
fn recommended_imputers(&self) -> Vec<&'static str>
Source§impl<T> MissingPatternValidator<MCAR> for TypedArray<T, MCAR, WithMissing>
impl<T> MissingPatternValidator<MCAR> for TypedArray<T, MCAR, WithMissing>
fn validate_assumptions(&self) -> SklResult<()>
fn recommended_imputers(&self) -> Vec<&'static str>
Source§impl<T> MissingPatternValidator<MNAR> for TypedArray<T, MNAR, WithMissing>
impl<T> MissingPatternValidator<MNAR> for TypedArray<T, MNAR, WithMissing>
fn validate_assumptions(&self) -> SklResult<()>
fn recommended_imputers(&self) -> Vec<&'static str>
Source§impl<T: Clone + PartialEq> TypeSafeMissingOps<T, UnknownMechanism, WithMissing> for TypedArray<T, UnknownMechanism, WithMissing>
impl<T: Clone + PartialEq> TypeSafeMissingOps<T, UnknownMechanism, WithMissing> for TypedArray<T, UnknownMechanism, WithMissing>
Source§fn is_complete(&self) -> bool
fn is_complete(&self) -> bool
Check if data is complete (no missing values)
Source§fn count_missing(&self) -> usize
fn count_missing(&self) -> usize
Count missing values
Source§fn missing_rate_per_feature(&self) -> Array1<f64>
fn missing_rate_per_feature(&self) -> Array1<f64>
Get missing rate per feature
Source§fn analyze_patterns(&self) -> Vec<MissingPattern>
fn analyze_patterns(&self) -> Vec<MissingPattern>
Get missing pattern analysis
Auto Trait Implementations§
impl<T, M, S> Freeze for TypedArray<T, M, S>
impl<T, M, S> RefUnwindSafe for TypedArray<T, M, S>
impl<T, M, S> Send for TypedArray<T, M, S>
impl<T, M, S> Sync for TypedArray<T, M, S>
impl<T, M, S> Unpin for TypedArray<T, M, S>
impl<T, M, S> UnwindSafe for TypedArray<T, M, S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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