File size: 2,669 Bytes
31ccd5d 7ba58da 31ccd5d 5192866 31ccd5d 5192866 31ccd5d 5192866 31ccd5d 5192866 31ccd5d ec86d43 31ccd5d a8f5804 5192866 31ccd5d 5192866 a219247 5192866 b51eb4b a8f5804 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | ---
license: cc0-1.0
task_categories:
- image-classification
- clustering
tags:
- mnist
- digits
- computer-vision
- machine-learning
- matlab
dataset_info:
features:
- name: data
dtype: uint8
shape: [784]
- name: labels
dtype: uint8
splits:
- name: train
num_bytes: 3170000000
num_examples: 8100000
---
# MNIST8M Dataset (.mat format)
## Dataset Description
This repository contains the MNIST8M dataset converted to MATLAB `.h5` format for convenient use in MATLAB environments. The original data is sourced from the LIBSVM datasets page.
### Dataset Summary
- **Original Source**: [LIBSVM Multiclass Datasets - MNIST8M](https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html#mnist8m)
- **Format Conversion**: Converted from original LibSVM format to MATLAB `.h5` format
- **Purpose**: Facilitate clustering and machine learning experiments in MATLAB
- **Files**: `MNIST8M_data.h5`, `labels.mat`
### Data Specifications
- **Samples**: 8,100,000 (8.1 million)
- **Features**: 784 (28×28 pixel images)
- **Data Type**: `uint8`
- **Value Range**: [0, 255]
- **Labels**: 10 classes (digits 0-9)
- **Label Type**: `uint8`
- **Label Range**: [0, 9]
### Storage Format
- `MNIST8M_data`: uint8 matrix of size 8,100,000 × 784
- `labels`: uint8 vector of size 8,100,000 × 1
### Usage Warning
⚠️ **Memory Considerations**: Loading the entire dataset directly into memory may cause out-of-memory errors on systems with insufficient RAM. The uncompressed data requires approximately 6GB of memory (8.1M × 784 × 1 byte).
### Recommended Usage
For systems with limited memory, consider:
- Loading data in batches
- Using memory-mapped files
- Working with data subsets
- Converting to single precision when possible
### Source Attribution
Original dataset courtesy of:
- [LIBSVM Datasets](https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html#mnist8m)
- [infinite MNIST](https://leon.bottou.org/projects/infimnist)
### MATLAB Loading Example
```
dataset_name = 'MNIST8M';
% Data path
data_file = 'MNIST8M_data.h5'; % Your directory
data = h5read(data_file, '/MNIST8M');
data = double(data); % May cause out-of-memory
data_info = h5info(data_file);
data_size = data_info.Datasets.Dataspace.Size;
n_points = data_size(1); % Total number of points
n_features = data_size(2); % Number of dimensions
```
```
>> h5disp('MNIST8M_data.h5');
HDF5 MNIST8M_data.h5
Group '/'
Dataset 'MNIST8M'
Size: 8100000x784
MaxSize: 8100000x784
Datatype: H5T_STD_U8LE (uint8)
ChunkSize: 100000x784
Filters: none
FillValue: 0
``` |