Biology Reference
In-Depth Information
35
30
25
20
15
1
2
3
4
5
6
number of slaves
Fig. 5.7 Performance of cross-validation for different numbers of slave processes, measured by its
execution time (in seconds)
Hill-climbing and tabu search have comparable error rates (50
4%,
respectively). As was the case for the bootstrap, using two slave processes halves
the execution time.
.
67 % and 50
.
> system.time(bn.cv(hailfinder, 'mmhc', loss = "pred",
+ loss.args = list(target = "CompPlFcst")))
user system elapsed
37.782 0.056 37.836
> cl = makeCluster(2, type = "MPI")
> system.time(bn.cv(hailfinder, 'mmhc', loss = "pred",
+ loss.args = list(target = "CompPlFcst"),
+ cluster = cl))
user system elapsed
0.196 0.032 19.202
> stopCluster(cl)
Adding more slaves to the cluster improves the performance of the cross-validation
further, at least up to cluster of size 6 (see Fig. 5.7 ).
> cl = makeCluster(3, type = "MPI")
> system.time(bn.cv(hailfinder, 'mmhc', loss = "pred",
+ loss.args = list(target = "CompPlFcst"),
+ cluster = cl))
user system elapsed
0.320 0.016 15.726
> stopCluster(cl)
> cl = makeCluster(4, type = "MPI")
> system.time(bn.cv(hailfinder, 'mmhc', loss = "pred",
+
loss.args = list(target = "CompPlFcst"),
+
cluster = cl))
 
Search WWH ::




Custom Search