How to add dataset to prtools
2 views (last 30 days)
Show older comments
wisekily
on 13 Mar 2016
Commented: Rahimeh Rouhi
on 7 Apr 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 Comments
Accepted Answer
Walter Roberson
on 13 Mar 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 Comments
Walter Roberson
on 7 Apr 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.
More Answers (0)
See Also
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!