How to add dataset to prtools
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
wisekily
el 13 de Mzo. de 2016
Comentada: Rahimeh Rouhi
el 7 de Abr. de 2018
I'm using matlab prtools and i want to make tests on "Hepatitis" dataset ,the problem is :i can't download it from UCI machine registry on the format of prdataset , so how can i do this?
2 comentarios
Respuesta aceptada
Walter Roberson
el 13 de Mzo. de 2016
%https://archive.ics.uci.edu/ml/datasets/Hepatitis
%https://archive.ics.uci.edu/ml/machine-learning-databases/hepatitis/hepatitis.data
fmt = repmat('%f',1,19);
fid = fopen('hepatitis.data', 'rt');
datacell = textscan(fid, fmt, 'delimiter', ',', 'TreatAsEmpty', '?', 'CollectOutput', 1);
fclose(fid);
hepclass = datacell{1}(:,1);
hepattrib = datacell{1}(:,2:end);
hepds = prdataset( hepattrib, hepclass );
4 comentarios
Walter Roberson
el 7 de Abr. de 2018
Reshape each of your 1024 x 1024 images to become a row vector, 1 x 1048576. Concatenate all of the row vectors together to get a 200 x 1048576 array. That array should be the first input to prdataset. The second input to prdataset should be an column vector indicating the class that each of the 200 images belongs to. This can be a numeric class number or can be a cell array of character strings giving a class label.
Más respuestas (0)
Ver también
Categorías
Más información sobre Large Files and Big Data en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!