pub trait CanonicalDataset {
// Required methods
fn data(&self) -> &ArrowDataset;
fn num_features(&self) -> usize;
fn num_classes(&self) -> usize;
fn feature_names(&self) -> &'static [&'static str];
fn target_name(&self) -> &'static str;
fn description(&self) -> &'static str;
// Provided methods
fn len(&self) -> usize { ... }
fn is_empty(&self) -> bool { ... }
}Expand description
A canonical ML dataset with train/test split support
Required Methods§
Sourcefn data(&self) -> &ArrowDataset
fn data(&self) -> &ArrowDataset
Returns the full dataset
Sourcefn num_features(&self) -> usize
fn num_features(&self) -> usize
Returns the number of features (excluding label)
Sourcefn num_classes(&self) -> usize
fn num_classes(&self) -> usize
Returns the number of classes (for classification datasets)
Sourcefn feature_names(&self) -> &'static [&'static str]
fn feature_names(&self) -> &'static [&'static str]
Returns the feature column names
Sourcefn target_name(&self) -> &'static str
fn target_name(&self) -> &'static str
Returns the label/target column name
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
Returns a description of the dataset