MATLAB PARALLEL COMPUTING TOOLBOX - S Guía de usuario Pagina 198

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 656
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 197
6 Programming Overview
6-58
Create two MapReducer objects for specifying the different execution environments for
mapreduce.
inMatlab = mapreducer(0);
inPool = mapreducer(p);
Create and preview the datastore. The data set used in this example is available in
matlabroot/toolbox/matlab/demos.
ds = datastore('airlinesmall.csv','TreatAsMissing','NA',...
'SelectedVariableNames','ArrDelay','ReadSize',1000);
preview(ds)
ArrDelay
________
8
8
21
13
4
59
3
11
Next, run the mapreduce calculation in the MATLAB client session. The map and reduce
functions are available in matlabroot/toolbox/matlab/demos.
meanDelay = mapreduce(ds,@meanArrivalDelayMapper,@meanArrivalDelayReducer,inMatlab);
********************************
* MAPREDUCE PROGRESS *
********************************
Map 0% Reduce 0%
Map 10% Reduce 0%
Map 20% Reduce 0%
Map 30% Reduce 0%
Map 40% Reduce 0%
Map 50% Reduce 0%
Map 60% Reduce 0%
Map 70% Reduce 0%
Map 80% Reduce 0%
Map 90% Reduce 0%
Map 100% Reduce 100%
Vista de pagina 197
1 2 ... 193 194 195 196 197 198 199 200 201 202 203 ... 655 656

Comentarios a estos manuales

Sin comentarios