Azzera filtri
Azzera filtri

Classification error for parfor

3 visualizzazioni (ultimi 30 giorni)
Abhishek Bhatia
Abhishek Bhatia il 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

Risposte (0)

Categorie

Scopri di più su Parallel Computing in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by