Filter löschen
Filter löschen

Classification error for parfor

3 Ansichten (letzte 30 Tage)
Abhishek Bhatia
Abhishek Bhatia am 2 Apr. 2015
Bearbeitet: Abhishek Bhatia am 2 Apr. 2015
I wished to write the below code in parallel:
max=0;
numvalues1=OpParam(1);
numvalues2=OpParam(2);
for i =LB(1):((UB(1)-LB(1))/(numvalues1 -1)):UB(1),
for j =LB(2):((UB(2)-LB(2))/(numvalues2 -1)):UB(2
acc=ComputeCbetaPerm( [i j],featureMatrix,labelMatrix);
if(acc < max)
acc=max;
values=[i j];
end
end
end
I Changed to the below to avoid the use of temporary variable `max` but still it gives an error of classification which I don't get.
numvalues1=OpParam(1);
numvalues2=OpParam(2);
Result=cell(numvalues1,numvalues2,1);
outervalues=LB(1):((UB(1)-LB(1))/(numvalues1 -1)):UB(1);
innervalues=LB(2):((UB(2)-LB(2))/(numvalues2 -1)):UB(2);
for (i =1:numel(outervalues)),
parfor (j =1:numel(innervalues)),
acc=ComputeCbetaPerm( [outervalues(i) innervalues(j)],featureMatrix,labelMatrix);
Result(i,:,1)={outervalues(i),innervalues(j),acc};
end
end
Also asked http://stackoverflow.com/questions/29414645/classification-error-for-parfor

Antworten (0)

Kategorien

Mehr zu Parallel Computing finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by