Slice rolling window array in parfor

3 Ansichten (letzte 30 Tage)
Roji
Roji am 28 Mai 2013
Hello,
I get the indexed but not sliced warning for variables inputs (numerical 3209x9)and output (categorical of three classes) in this parfor loop:
matlabpool open
tic
parfor i=1:zet-1008
inputsample=inputs(i:i+1007,:);
outputsample=output(i:i+1007,:);
model = initlssvm(inputsample,outputsample,etc...;
end
toc
matlabpool close
How could I slice those variables to use them in the model?
Kind Regards

Antworten (2)

Edric Ellis
Edric Ellis am 31 Mai 2013
In this case, I think the warning is probably inevitable, and harmless, since the iterations of your loop need to use overlapping portions of data. This warning is simply informing you that the full values of 'inputs' and 'output' need to be transmitted to each worker. The warning exists because in some cases it is possible to eliminate the non-sliced access, and that results in less data transmission.

Roji
Roji am 31 Mai 2013
Many, many thanks Edric.
Kindest Regards,
Roji

Kategorien

Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by