Expand description
Built-in dataset implementations for machine learning.
dataset-ml provides ready-to-use loaders for classic ML datasets built on top
of dataset_core::Dataset. Each module is a worked example showing how to wrap
Dataset<T, E> for a concrete data source: downloading from a URL, verifying a
SHA-256 hash, parsing CSV records (or extracting raw documents from an archive),
and exposing typed accessors backed by ndarray.
§Datasets
| Module | Samples | Features | Task Type |
|---|---|---|---|
abalone | 4,177 | 8 | Regression |
adult | 32,561 | 14 | Classification |
bank_marketing | 45,211 | 16 | Classification |
iris | 150 | 4 | Classification |
breast_cancer | 569 | 30 | Classification |
boston_housing | 506 | 13 | Regression |
california_housing | 20,640 | 8 | Regression |
car_evaluation | 1,728 | 6 | Classification |
covtype | 581,012 | 54 | Classification |
diabetes | 442 | 10 | Regression |
digits | 1,797 | 64 | Classification |
heart_disease | 303 | 13 | Classification |
ionosphere | 351 | 34 | Classification |
kddcup99 | 494,021 / 4,898,431 | 41 | Classification |
linnerud | 20 | 3 | Regression (multi-output) |
mushroom | 8,124 | 22 | Classification |
titanic | 891 | 11 | Classification |
palmer_penguins | 344 | 7 | Classification |
sms_spam | 5,574 | text | Classification |
wine_recognition | 178 | 13 | Classification |
wine_quality::red_wine_quality | 1,599 | 11 | Regression |
wine_quality::white_wine_quality | 4,898 | 11 | Regression |
youtube_spam | 1,956 | text | Classification |
sentiment_sentences | 3,000 | text | Classification |
newsgroups20 | 11,314 / 18,846 | text | Classification |
movie_review_polarity | 2,000 | text | Classification |
§Example
use dataset_ml::iris::Iris;
let iris = Iris::new("./data");
let (features, labels) = iris.data().unwrap();
assert_eq!(features.shape(), &[150, 4]);All loaders are lazy: the first call downloads and parses the file, every subsequent call returns a cached reference. See the individual module docs for features, target, sample count, and source.
Re-exports§
pub use abalone::Abalone;pub use adult::Adult;pub use bank_marketing::BankMarketing;pub use boston_housing::BostonHousing;pub use breast_cancer::BreastCancer;pub use california_housing::CaliforniaHousing;pub use car_evaluation::CarEvaluation;pub use covtype::Covtype;pub use diabetes::Diabetes;pub use digits::Digits;pub use heart_disease::HeartDisease;pub use ionosphere::Ionosphere;pub use iris::Iris;pub use kddcup99::Kddcup99;pub use linnerud::Linnerud;pub use movie_review_polarity::MovieReviewPolarity;pub use mushroom::Mushroom;pub use newsgroups20::Newsgroups20;pub use palmer_penguins::PalmerPenguins;pub use sentiment_sentences::SentimentSentences;pub use sms_spam::SmsSpam;pub use titanic::Titanic;pub use wine_quality::red_wine_quality::RedWineQuality;pub use wine_quality::white_wine_quality::WhiteWineQuality;pub use wine_recognition::WineRecognition;pub use youtube_spam::YoutubeSpam;
Modules§
- abalone
- Abalone dataset module.
- adult
- Adult / Census Income dataset module.
- bank_
marketing - Bank Marketing dataset module.
- boston_
housing - Boston Housing dataset module.
- breast_
cancer - Breast Cancer Wisconsin (Diagnostic) dataset module.
- california_
housing - California Housing dataset module.
- car_
evaluation - Car Evaluation dataset module.
- covtype
- Forest Cover Type dataset module.
- diabetes
- Diabetes dataset module.
- digits
- Optical Recognition of Handwritten Digits dataset module.
- heart_
disease - Heart Disease (Cleveland) dataset module.
- ionosphere
- Ionosphere dataset module.
- iris
- Iris flower dataset module.
- kddcup99
- KDD Cup 1999 network-intrusion dataset module.
- linnerud
- Linnerud dataset module.
- movie_
review_ polarity - Movie Review Polarity dataset module.
- mushroom
- Mushroom dataset module.
- newsgroups20
- 20 Newsgroups dataset module.
- palmer_
penguins - Palmer Penguins dataset module.
- sentiment_
sentences - Sentiment Labelled Sentences dataset module.
- sms_
spam - SMS Spam Collection dataset module.
- titanic
- Titanic dataset module.
- wine_
quality - Wine Quality dataset module.
- wine_
recognition - Wine Recognition dataset module.
- youtube_
spam - YouTube Spam Collection dataset module.