Changes between Version 1 and Version 2 of Details


Ignore:
Timestamp:
Jan 18, 2010, 8:43:23 PM (14 years ago)
Author:
alexandru.sorici
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Details

    v1 v2  
    3434The modifications are as follows:
    3535       
    36         - 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
     36        - 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
    3939
    4040{{{
     
    5858                                  whithout entering any race conditions (these structures need to be private to every thread).
    5959
    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]]
     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]]
    6363                       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.
    6464
    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.
     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.
    6666
    6767'''Project Results'''
     
    7070As our tests show, the dataset used to test the algorithm is not that well suited to parallelization because the amount
    7171of work done for attribute gain computation is not very big.
    72 Tests show that in the serial version the inclusive time spent in FormTree equal 7.202 seconds.
     72Tests show that in the serial version the inclusive time spent in `FormTree()` equal 7.202 seconds.
    7373
    7474
    7575In the parallel version (with 2 threads) the time drops to about 4.8 seconds. Yet because the algorithm uses recursive calls
    76 to the FormTree function, the thread team is started at each recursive call, and the overhead caused by this + some necessary
     76to the `FormTree()` function, the thread team is started at each recursive call, and the overhead caused by this + some necessary
    7777thread synchronizations compensate for the gain in execution speed, such that overall, there is no clearly noticeable speedup.