Slice rolling window array in parfor
显示 更早的评论
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
回答(2 个)
Edric Ellis
2013-5-31
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Parallel for-Loops (parfor) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!