How to add dataset to prtools

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

You appear to be referring to http://prtools.org/
wisekily
wisekily on 13 Mar 2016
Edited: wisekily on 13 Mar 2016
yes it is http://prtools.org/ (pattern recognition toolbox)

Sign in to comment.

 Accepted Answer

%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

thank you sir
Hello, I'm gonna use my own dataset containing 200 images 1024*1024 of 10 classes (i.e., each object has 1024*1024 feature). How can I prepare a suitable dataset for prtools? Thanks for your answers.
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.
Many thanks.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!