Effacer les filtres
Effacer les filtres

Classification error for parfor

3 vues (au cours des 30 derniers jours)
Abhishek Bhatia
Abhishek Bhatia le 2 Avr 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

Réponses (0)

Catégories

En savoir plus sur Parallel Computing dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by