pub struct MnistDataset { /* private fields */ }Expand description
MNIST handwritten digits dataset
Implementations§
Source§impl MnistDataset
impl MnistDataset
Sourcepub fn load_full() -> Result<Self>
pub fn load_full() -> Result<Self>
Load full MNIST from HuggingFace Hub (requires hf-hub feature)
Sourcepub fn split(&self) -> Result<DatasetSplit>
pub fn split(&self) -> Result<DatasetSplit>
Get stratified train/test split (80/20 for embedded data)
Uses stratified sampling to ensure all digit classes (0-9) are represented in both train and test sets with proportional distribution.
§Errors
Returns an error if the dataset is empty or split fails.
Trait Implementations§
Source§impl CanonicalDataset for MnistDataset
impl CanonicalDataset for MnistDataset
Source§fn data(&self) -> &ArrowDataset
fn data(&self) -> &ArrowDataset
Returns the full dataset
Source§fn num_features(&self) -> usize
fn num_features(&self) -> usize
Returns the number of features (excluding label)
Source§fn num_classes(&self) -> usize
fn num_classes(&self) -> usize
Returns the number of classes (for classification datasets)
Source§fn feature_names(&self) -> &'static [&'static str]
fn feature_names(&self) -> &'static [&'static str]
Returns the feature column names
Source§fn target_name(&self) -> &'static str
fn target_name(&self) -> &'static str
Returns the label/target column name
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Returns a description of the dataset
Source§impl Clone for MnistDataset
impl Clone for MnistDataset
Source§fn clone(&self) -> MnistDataset
fn clone(&self) -> MnistDataset
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 moreAuto Trait Implementations§
impl Freeze for MnistDataset
impl !RefUnwindSafe for MnistDataset
impl Send for MnistDataset
impl Sync for MnistDataset
impl Unpin for MnistDataset
impl UnsafeUnpin for MnistDataset
impl !UnwindSafe for MnistDataset
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> 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>
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 moreCreates a shared type from an unshared type.