collect multiple variable in one set

1 view (last 30 days)
Hi everyone,
i have many classifiers and the user select some of them and after that i need to plot the roc for the selected classifiers. my problem is how to collect the names in the roc format. example :
the user may select these classifers
w4 = polyc(Training_Set);
w7 = treec(Training_Set);
w10=nmc(Tra ining_Set);
then i need to put the variable (w4,w7,w10) in this form:
e= roc(Testing_set, {w4,w7,w10});
plote(e);
please can anyone help me ASAP
Best regard

Accepted Answer

Image Analyst
Image Analyst on 24 Aug 2013
You can create a structure to collect all the various variables into one variable:
allMyClassifiers.w4 = w4;
allMyClassifiers.w7 = w7;
allMyClassifiers.w10 = w10;
Or you can keep the classifier number totally independent of what's assigned to it.
allMyClassifiers.c1= w4;
allMyClassifiers.c2= w7;
allMyClassifiers.c3= w10;
Or you can create a cell array where each cell is one classifier. That way you just index the classifiers by a number that doesn't depend on the name of the classifier:
allMyClassifiers{1}= w4;
allMyClassifiers{2} = w7;
allMyClassifiers{3} = w10;
Then call your function passing it:
e = roc(Testing_set, allMyClassifiers);
  1 Comment
Student
Student on 24 Aug 2013
thank you very much "Image Analyst", i use the third one which is a cell array and it work with me,
thank again,
Best Regard

Sign in to comment.

More Answers (0)

Categories

Find more on ROC - AUC in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!