I have a mnist dataset as a .mat
file, and want to split train and test data with sklearn. sklearn reads the .mat file as below:
{'__header__': b'MATLAB 5.0 MAT-file, Platform: GLNXA64, Created on: Sat Oct 8 18:13:47 2016',
'__version__': '1.0',
'__globals__': [],
'train_fea1': array([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]], dtype=uint8),
'train_gnd1': array([[ 1],
[ 1],
[ 1],
...,
[10],
[10],
[10]], dtype=uint8),
'test_fea1': array([[ 0, 0, 0, ..., 0, 0, 0],
[ 0, 0, 0, ..., 0, 0, 0],
[ 0, 0, 0, ..., 0, 0, 0],
...,
[ 0, 0, 0, ..., 0, 0, 0],
[ 0, 0, 0, ..., 64, 0, 0],
[ 0, 0, 0, ..., 25, 0, 0]], dtype=uint8),
'test_gnd1': array([[ 1],
[ 1],
[ 1],
...,
[10],
[10],
[10]], dtype=uint8)}
How to do that?