Asked by Hadeel Arslan
on 17 Apr 2013

- I'm not really a user of MatLab but I have a homework so that I'm learning and I need your help please

- so ...I have a char data in MS excel file , it gives a matrix of 1824x22 + extra column called class with is either ('e','p'), I have to divide the data into 2 haves(testing_set , training_set), **train the corresponding classifier.

- compare the categories produced (classifications) by classify function on the testing set with the actual classes provided in the testing set. Calculate the percentage of cases that that were correctly classified by the four types of classify function.

- I already did this so far and I can't go any farther without help

MATLAB code

[~,raw]=xlsread('orderedfile','A1:V8124')

raw = double(cell2mat(raw))

dimen = size(raw)

nraw = dimen(1)

ncol = dimen(2)

train_set = raw(1:(nrow/2),:)

test_set = raw(((nrow/2) + 1):nrow,:)

*No products are associated with this question.*

Answer by Tom Lane
on 18 Apr 2013

I don't have your data. I suspect you need to define train_set and test_set to have only the data without the class labels. Then create train_class and test_class to hold the class labels. Then type "help classify" and "help confusionmat" and see where that gets you.

Hadeel Arslan
on 18 Apr 2013

here's my data : https://www.dropbox.com/s/cavfeuyfby8ciq6/orderedfile.xlsx

Answer by Hadeel Arslan
on 18 Apr 2013

Edited by Hadeel Arslan
on 18 Apr 2013

this is a link to my data : https://www.dropbox.com/s/cavfeuyfby8ciq6/orderedfile.xlsx

Opportunities for recent engineering grads.

## 0 Comments