Changes between Version 1 and Version 2 of Details
- Timestamp:
- Jan 18, 2010, 8:43:23 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Details
v1 v2 34 34 The modifications are as follows: 35 35 36 - in c4.5.c - the if statement that determines whether batch mode is being used now calls OneTree_discr instead of OneTree37 - in besttree.c - OneTree_discr calls FormTree_discr38 - in build.c - functionality has been added to the InitialiseTreeDatafunction36 - in c4.5.c - the if statement that determines whether batch mode is being used now calls `OneTree_discr()` instead of `OneTree()` 37 - in besttree.c - `OneTree_discr()` calls `FormTree_discr()` 38 - in build.c - functionality has been added to the `InitialiseTreeData()` function 39 39 40 40 {{{ … … 58 58 whithout entering any race conditions (these structures need to be private to every thread). 59 59 60 - in build.c - the FormTree_discrfunction contains the #pragma omp parallel for construct that computes attribute gains in parllel.[[BR]]61 The directive also has a reduction clause on two variables: AvGain, Possible. The variables are necessary to compute the average gain of the attribute.[[BR]]62 The FormTree_discr function calls EvalAttributeDisc_discr()for every attribute in the for loop.[[BR]]60 - in build.c - the `FormTree_discr()` function contains the #pragma omp parallel for construct that computes attribute gains in parllel.[[BR]] 61 The directive also has a reduction clause on two variables: `AvGain`, `Possible`. The variables are necessary to compute the average gain of the attribute.[[BR]] 62 The `FormTree_discr()` function calls `EvalAttributeDisc_discr()` for every attribute in the for loop.[[BR]] 63 63 This method is similar to the Synchronous Tree Construction approach described in theory, where the team of threads cooperates to expand (compute the best attribute) the tree at each step. 64 64 65 - in discr.c - the EvalAttributeDisc_discr function evaluates each attribute. In discr.c each function ending in _discris our modified version of the original function. The modifications are minor and mostly only concern the number and type of parameters passed to the function.65 - in discr.c - the `EvalAttributeDisc_discr()` function evaluates each attribute. In discr.c each function ending in `_discr` is our modified version of the original function. The modifications are minor and mostly only concern the number and type of parameters passed to the function. 66 66 67 67 '''Project Results''' … … 70 70 As our tests show, the dataset used to test the algorithm is not that well suited to parallelization because the amount 71 71 of work done for attribute gain computation is not very big. 72 Tests show that in the serial version the inclusive time spent in FormTreeequal 7.202 seconds.72 Tests show that in the serial version the inclusive time spent in `FormTree()` equal 7.202 seconds. 73 73 74 74 75 75 In the parallel version (with 2 threads) the time drops to about 4.8 seconds. Yet because the algorithm uses recursive calls 76 to the FormTreefunction, the thread team is started at each recursive call, and the overhead caused by this + some necessary76 to the `FormTree()` function, the thread team is started at each recursive call, and the overhead caused by this + some necessary 77 77 thread synchronizations compensate for the gain in execution speed, such that overall, there is no clearly noticeable speedup.