A Comparative Analysis of Conjugate Gradient Algorithms ...economical, automatic tool to generate...

13
Chiang Mai J. Sci. 2011; 38 (Special Issue) : 123-135 www.science.cmu.ac.th/journal-science/josci.html Contributed Paper A Comparative Analysis of Conjugate Gradient Algorithms & PSO Based Neural Network Approaches for Reusability Evaluation of Procedure Based Software Systems Parvinder S. Sandhu*[a], Shalini Chhabra [b] [a] Computer Science & Engineering Department, Rayat-Bahra Institute of Engineering & Bio-Technology, Punjab, India. [b] Computer Science & Engineering Department, Rayat Institute of Engineering & Information Technology, Rail Majra, Punjab, India. *Author for correspondence; e-mail: [email protected] Received: 15 July 2010 Accepted: 31 January 2011 ABSTRACT Software reusability is primary attribute of software quality. There are metrics for identifying the quality of reusable components but the function that makes use of these metrics to find reusability of software components is still not clear. These metrics if identified in the design phase or even in the coding phase can help us to reduce the rework by improving quality of reuse of the component and hence improve the productivity due to probabilistic increase in the reuse level. We have taken the dataset and framework of metrics, that make use of McCabe’s Cyclometric Complexity Measure for Complexity measurement, Regularity Metric, Halstead Software Science Indicator for Volume indication, Reuse Frequency metric and Coupling Metric values of the software component as input attributes and calculated reusability of the software component. In this work, Particle Swarm Optimization technique along with the four variants of Conjugate Gradient Algorithms is empirically explored to train a feed forward neural network for reusability dataset. The performance of the trained neural networks is tested to evaluate the reusability level of the procedure based software systems. The results are recorded in terms of Accuracy, Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE). Keywords: software reusability, particle swarm optimization, neural network. 1. INTRODUCTION The demand for new software applications is currently increasing at the exponential rate, as is the cost to develop them. The numbers of qualified and experienced professionals required for this extra work are not increasing commensurably [1]. Software professionals have recognized reuse as a powerful means of potentially overcoming the above said software crisis [2, 3] and it promises significant improvements in software productivity and quality [4, 5]. There are two approaches for reuse of

Transcript of A Comparative Analysis of Conjugate Gradient Algorithms ...economical, automatic tool to generate...

  • Chiang Mai J. Sci. 2011; 38 (Special Issue) 123

    Chiang Mai J. Sci. 2011; 38 (Special Issue) : 123-135www.science.cmu.ac.th/journal-science/josci.htmlContributed Paper

    A Comparative Analysis of Conjugate GradientAlgorithms & PSO Based Neural Network Approachesfor Reusability Evaluation of Procedure BasedSoftware SystemsParvinder S. Sandhu*[a], Shalini Chhabra [b][a] Computer Science & Engineering Department, Rayat-Bahra Institute of Engineering & Bio-Technology,

    Punjab, India.[b] Computer Science & Engineering Department, Rayat Institute of Engineering & Information Technology,

    Rail Majra, Punjab, India.*Author for correspondence; e-mail: [email protected]

    Received: 15 July 2010 Accepted: 31 January 2011

    ABSTRACTSoftware reusability is primary attribute of software quality. There are metrics for

    identifying the quality of reusable components but the function that makes use of these metricsto find reusability of software components is still not clear. These metrics if identified in thedesign phase or even in the coding phase can help us to reduce the rework by improvingquality of reuse of the component and hence improve the productivity due to probabilisticincrease in the reuse level. We have taken the dataset and framework of metrics, that make useof McCabe’s Cyclometric Complexity Measure for Complexity measurement, RegularityMetric, Halstead Software Science Indicator for Volume indication, Reuse Frequency metricand Coupling Metric values of the software component as input attributes and calculatedreusability of the software component. In this work, Particle Swarm Optimization techniquealong with the four variants of Conjugate Gradient Algorithms is empirically explored to traina feed forward neural network for reusability dataset. The performance of the trained neuralnetworks is tested to evaluate the reusability level of the procedure based software systems.The results are recorded in terms of Accuracy, Mean Absolute Error (MAE) and Root MeanSquared Error (RMSE).

    Keywords: software reusability, particle swarm optimization, neural network.

    1. INTRODUCTIONThe demand for new software

    applications is currently increasing at theexponential rate, as is the cost to develop them.The numbers of qualified and experiencedprofessionals required for this extra work arenot increasing commensurably [1]. Software

    professionals have recognized reuse as apowerful means of potentially overcomingthe above said software crisis [2, 3] and itpromises significant improvements in softwareproductivity and quality [4, 5].

    There are two approaches for reuse of

  • 124 Chiang Mai J. Sci. 2011; 38 (Special Issue)

    code: develop the reusable code from scratchor identify and extract the reusable code fromalready developed code. The organization thathas experience in developing software, but notyet used the software reuse concept, there existextra cost to develop the reusable componentsfrom scratch to build and strengthen theirreusable software reservoir [4]. The cost ofdeveloping the software from scratch can besaved by identifying and extracting the reusablecomponents from already developed andexisting software systems or legacy systems[6]. But the issue of how to identify reusablecomponents from existing systems hasremained relatively unexplored. In both thecases, whether we are developing softwarefrom scratch or reusing code from alreadydeveloped projects, there is a need ofevaluating the quality of the potentiallyreusable piece of software. The contributionof metrics to the overall objective of thesoftware quality is understood and recognized[7-9]. But how these metrics collectivelydetermine reusability of a softwarecomponent is still at its early stage. A neuralNetwork approach could serve as aneconomical, automatic tool to generatereusability ranking of software [10]. But,when one designs with Neural Networksalone, the network is a black box that needsto be defined, which is a highly compute-intensive process. One must develop a goodsense, after extensive experimentation andpractice, of the complexity of the networkand the learning algorithm to be used.

    In this paper, Particle SwarmOptimization trained Neural Network andConjugate Gradient Algorithms based neuralnetworks are empirically explored to evaluatethe reusability of the function orientedsoftware systems. This paper consists of 6sections. The second section explains therelated work regarding measuring thesoftware quality specifically software

    reusability. The third section introduces thePSO technique used for the training of theneural network. In the fourth section themethodology of evaluating reusability isdiscussed. In the fifth section thereimplementation results are illustrated and inthe final section conclusion is written.

    2. RELATED WORKOne possible measure of a component’s

    reusability comes from its success; how manyother applications modules access thiscommon code? Other measures come fromstatic code metrics. There are basically twoapproaches to evaluate software reusability:qualitative and empirical. The qualitativemethods require substantial manual effort, asthese methods generally rely on a subjectivevalue attached to how well the softwareadheres to some guidelines or principles. Onthe other hand, empirical methods depend onthe objective data that can be collectedautomatically and cheaply with the help ofsome tool [11].

    Selby [12] identified a number ofcharacteristics of those components, fromexisting systems, that are being reused atNASA laboratory and reported that thedevelopers were successful in achieving a 32percent reusability index. Selby’s recentexperimental study has identified twocategories of factors that characterizesuccessful reuse-based software developmentof large-scale systems: module design factorsand module implementation factors [13]. Themodule design factors that characterizemodule reuse without revision were: few callsto other system modules (i.e. low coupling),many calls to utility functions (i.e. highcohesion), few input-output parameters, fewreads and writes, and many comments. Themodule implementation factors thatcharacterize module reuse without revisionwere small in size (source lines) and with many

  • Chiang Mai J. Sci. 2011; 38 (Special Issue) 125

    assignment statements (i.e. low CyclometricComplexity). The modules reused withoutrevision had the fewest faults, fewest faultsper source line, and lowest fault correctioneffort. The modules reused with majorrevision had the highest fault correction effort.

    Reformat et al have used decision treebased approach to the problems ofidentification of good or bad software basedon Java and C++ objects. In the study fifteenmetrics have been used and 55 to 72%Accuracy has been reported [14]. Prieto-Diazand Freeman encouraged white-box reuse andidentified five program attributes forevaluating reusability [15]. The attributes usedare:

    • Program Size• Program Structure• Program Documentation• Programming Language• Reuse Experience

    3. PARTICLE SWARM OPTIMIZATIONParticle swarm optimization (PSO) is a

    population based stochastic optimizationtechnique developed by Eberhart andKennedy in 1995, inspired by social behaviorof bird flock or fish schooling [16]. Theadvantages of PSO are that PSO is easy toimplement and there are few parameters toadjust. PSO has been successfully applied inmany areas: function optimization, artificialneural network training, fuzzy system control,and other areas [16].

    PSO is initialized with a group of randomparticles (solutions) and then searches foroptima by updating generations. In everyiteration, each particle is updated by followingtwo “best” values. The first one is the bestsolution (fitness) it has achieved so far. (Thefitness value is also stored.) This value is calledpbest. Another “best” value that is tracked bythe particle swarm optimizer is the best value,obtained so far by any particle in the

    population. This best value is a global bestand called gbest. When a particle takes partof the population as its topological neighbors,the best value is a local best and is called lbest[16].

    After finding the two best values, theparticle updates its velocity and positions withfollowing equation (3.1) and (3.2).

    v[] = v[] +c1*rand()*(pbest[]-present[])+c2*rand()*(gbest[]-present[]) (3.1)

    present[] = present[] + v[] (3.2)

    Where array v[ ] is the particle velocityand persent[ ] is the current particle (solution).The arrays pbest [ ] and gbest [ ] are definedas stated before. The function named as rand( ) is a random number between (0, 1). Theconstants c1, c2 are learning factors. Usuallyc1 = c2 = 2.

    As mentioned in [17], the pseudo codeof the procedure is as follows:

    For each particle Initialize particleEND

    Do For each particle Calculate fitness value If the fitness value is better than the best fitness value (pbest) in history set current value as the new pbest End

    Choose the particle with the best fitness value of all the particles as the gbest For each particle Calculate particle velocity according equ. (3.1) Update particle position according equ. (3.2) End

  • 126 Chiang Mai J. Sci. 2011; 38 (Special Issue)

    While maximum iterations or minimumerror criteria is not attained Particles’ velocitieson each dimension are clamped to amaximum velocity Vmax. If the sum ofaccelerations would cause the velocity on thatdimension to exceed Vmax (which is aparameter specified by the user), then thevelocity on that dimension is limited to Vmax.

    4. METHODOLOGYIn the methodology following steps are

    used.

    4.1 Metric Suit for Function OrientedParadigm

    We have taken the dataset andframework of metrics, discussed in our earlierpapers [18] and [19]. A framework of realvalues of five input metrics is proposed forstructural analysis of procedure or function-oriented. The output is the resuablity value ofthe component. In the example dataset thereusability value is expressed in terms of levelsof reusability values from 1 to 6. The value 1means ‘Nil’ reusability level and value 6 showsthe ‘Excellent’ reusability level. The code ofsoftware is parsed to calculate the metricvalues. The following suits of metrics are ableto target those the essential attributes offunction oriented features towards measuringthe reusability of software modules, so it triedto analyze, refine and use following metricsto explore different structural dimensions ofFunction oriented components.

    The proposed metrics for FunctionOriented Paradigm are as follows.

    4.1.1 Cyclometric Complexity Using McCabe’s Measure [18-20]

    According to Mc Cabe, the value ofCyclometric Complexity (CC) can beobtained using the following equation:

    CC = Number of predicate nodes+1(4.1)

    Where predicate nodes are the nodes ofthe directed graph, made for the component,where the decisions are made.

    4.1.2 Halstead Software Science Indicator[18, 19, 21]

    According to this metric volume of thesource code of the software component isexpressed in the following equation:

    Volume=(N1+N2)log2(η1+η2) (4.2)Where, η1 is the number of distinct

    operators that appear in the program, η2 isnumber of distinct operands that appear inthe program, N1 is the total number ofoperator occurrences and N2 is the totalnumber of operand occurrences.

    The high volume means that softwarecomponent needs more maintenance cost,correctness cost and modification cost. Onthe other hand, less volume increases theextraction cost, identification cost from therepository and packaging cost of thecomponent. So the volume of the reusablecomponent should be in between the twoextremes.

    4.1.3 Regularity Metric [18, 19, 21]The notion behind Regularity is to predict

    length based on some regularity assumptions.As actual length (N) is sum of N1 and N2.The estimated length is shown in the followingequation:Estimated Length=η1log2η1+η2 log2η2 (4.3)

    The closeness of the estimate is a measureof the Regularity of Component coding iscalculated as: Regularity = 1-{N-N′)/N}=N′/N (4.4)

    Hence, there should be some minimumlevel of Regularity of the component toindicate the reusability of that component.

    4.1.4 Reuse-Frequency Metric [18, 19, 21]Reuse frequency is calculated by

    comparing number of static calls addressed

  • Chiang Mai J. Sci. 2011; 38 (Special Issue) 127

    to a component with number of callsaddressed to the component whose reusabilityis to be measured. Let N user definedcomponents be X1, X2 … XN in the system,where S1, S2 … SM are the standardenvironment components e.g. printf in Clanguage, then Reuse-Frequency is calculatedas:

    Reuse-Frequency = (4.5)

    Equation (4.5) shows that the Reuse-Frequency is the measure of functionusefulness of a component. Hence thereshould be some minimum value of Reuse-Frequency to make software componentreally reusable [22].

    4.1.5 Coupling Metric [18, 19]Functions/methods that are loosely

    bound tend to be easier to remove and use inother contexts than those that depend heavilyon other functions or non-local data. Differenttypes of coupling effects reusability todifferent extent.

    Weight of coupling increases fromcategory “a” to “d”, means

    Data Coupling is lightest weight coupling,whereas Content Coupling is the heaviest one.Letai be the number of functions called and Data

    Coupled with function “i”bibe the number of functions called and

    Stamp Coupled with function “i”ci be the number of functions called by

    function “i” and Control Coupled withfunction “i”

    dibe the number of functions CommonCoupled with function “i”

    f(x, a, c) = (4.6)

    Where a = 10, c = 0.5 and wi for i = 1,2, 3, 4 is the weights of the respective the

    coupling types.As coupling increases, there is decrease

    in understandability and maintainability, sothere should be some maximum value of thecoupling.

    4.2 Design and Evaluate Neural NetworkSystem

    The following five Neural Networkalgorithms are experimented:

    • Fletcher –Reeves Update ConjugateGradient (FRUCG) algorithm

    • Polak–Ribiere Update ConjugateGradient (PRUCG) algorithm

    • Powell-Beale Restarts ConjugateGradient (PBRCG) algorithm

    • Scaled Conjugate Gradient (SCG)algorithm

    • Neural Network Trained with particleswarm optimization Algorithm (NPSO)

    Once the network weights and biases areinitialized, the network is ready for training.The network can be trained for functionapproximation (nonlinear regression), patternassociation, or pattern classification. Thetraining process requires a set of examplesof proper network behavior — networkinputs p and target outputs t. During trainingthe weights and biases of the network areiteratively adjusted to minimize the networkperformance function.

    The basic backpropagation algorithmadjusts the weights in the steepest descentdirection (negative of the gradient), thedirection in which the performance functionis decreasing most rapidly. It turns out that,although the function decreases most rapidlyalong the negative of the gradient, this doesnot necessarily produce the fastestconvergence. In the conjugate gradientalgorithms a search is performed alongconjugate directions, which produces generallyfaster convergence than steepest descent

  • 128 Chiang Mai J. Sci. 2011; 38 (Special Issue)

    directions. In most of the training algorithms,a learning rate is used to determine the lengthof the weight update (step size) and the stepsize is adjusted at each iteration. Here, a searchis made along the conjugate gradient directionto determine the step size that minimizes theperformance function along that line. Thereare four variations of conjugate gradientalgorithms:

    a) Fletcher-ReevesUpdate [22-24]This is the ratio of the norm squared of

    the current gradient to the norm squared ofthe previous gradient. The algorithm can trainany network as long as its weight, net input,and transfer functions have derivativefunctions. Backpropagation is used to calculatederivatives of performance with respect tothe weight and bias variables X. Each variableis adjusted according to the following:

    X = X + a*dX (4.7)

    Where, dX is the search direction. Theparameter ‘a’ is selected to minimize theperformance along the search direction. Theline search function is used to locate theminimum point. The first search direction isthe negative of the gradient of performance.In succeeding iterations the search direction iscomputed from the new gradient and theprevious search direction, according to theformula:

    dX = -gX + dX_old*Z (4.8)

    Where, gX is the gradient. The parameter‘Z’ can be computed in several different ways.For the Fletcher-Reeves variation of conjugategradient it is computed according to:

    (4.9)

    Where, norm_sqr is the norm square of

    the previous gradient and normnew_sqr is thenorm square of the current gradient.

    b) Polak-Ribi re Update [22-24]Another version of the conjugate

    gradient algorithm was proposed by Polakand Ribi re. The algorithm can train anynetwork as long as its weight, net input, andtransfer functions have derivative functions.Here also, backpropagation is used to calculatederivatives of performance with respect tothe weight and bias variables X. Each variableis adjusted according to the equation (4.7). Theparameter ‘a’ is selected to minimize theperformance along the search direction. Theline search function is used to locate theminimum point. The first search direction isthe negative of the gradient of performance.In succeeding iterations the search direction iscomputed from the new gradient and theprevious search direction according to theequation (4.8). Where, gX is the gradient. Theparameter ‘Z’ can be computed in severaldifferent ways. For the Polak-Ribi re variationof conjugate gradient, it is computedaccording to the following equation:

    (4.10)

    Where, norm_sqr is the norm square ofthe previous gradient, and gX_old is thegradient on the previous iteration. The storagerequirements for Polak-Ribi re (four vectors)are slightly larger than for Fletcher-Reeves(three vectors).

    c) Powell-Beale RestartsFor all cojugate gradient algorithms, the

    search direction is periodically reset to thenegative of the gradient. The standard resetpoint occurs when the number of iterationsis equal to the number of network parameters(weights and biases), but there are other resetmethods that can improve the efficiency of

  • Chiang Mai J. Sci. 2011; 38 (Special Issue) 129

    training. One such reset method was proposedby Powell [25], based on an earlier versionproposed by Beale [26]. This technique restartsif there is very little orthogonality left betweenthe current gradient and the previous gradient.This is tested with the following inequality:

    (4.11)

    If this condition is satisfied, the searchdirection is reset to the negative of thegradient.

    This algorithm can train any network aslong as its weight, net input, and transferfunctions have derivative functions. Backpro-pagation is used to calculate derivatives ofperformance with respect to the weight andbias variables X. Each variable is adjustedaccording to equation (4.7). Where dX is thesearch direction. The parameter “a” is selectedto minimize the performance along the searchdirection. The line search function is used tolocate the minimum point. The first searchdirection is the negative of the gradient ofperformance. In succeeding iterations thesearch direction is computed from the newgradient and the previous search directionaccording to equation (4.8). Where gX is thegradient. The parameter “Z” can be computedin several different ways. So, The Powell-Bealevariation of conjugate gradient is distinguishedby two features. First, the algorithm uses atest to determine when to reset the searchdirection to the negative of the gradient.Second, the search direction is computed fromthe negative gradient, the previous searchdirection, and the last search direction beforethe previous reset.

    The storage requirements for the Powell-Beale algorithm (six vectors) are slightly largerthan for Polak-Ribi re (four vectors).

    d) Scaled Conjugate GradientEach of the conjugate gradient algorithms

    discussed so far requires a line search at eachiteration. This line search is computationallyexpensive, because it requires that thenetwork response to all training inputs becomputed several times for each search. Thescaled conjugate gradient algorithm (SCG),developed by Moller [27], was designed toavoid the time-consuming line search. Thisalgorithm combines the model-trust regionapproach with the conjugate gradientapproach [27]. The storage requirements forthe scaled conjugate gradient algorithm areabout the same as those of Fletcher-Reeves.

    The algorithm train any network as longas its weight, net input, and transfer functionshave derivative functions. Backpropagation isused to calculate derivatives of performancewith respect to the weight and bias variablesX. The scaled conjugate gradient algorithmis based on conjugate directions, but thisalgorithm does not perform a line search ateach iteration.

    The following are the phases for thedifferent Neural Network based modelingsystem:

    4.2.1 Phase IIn this phase Designing of Neural

    Network and Training is performed. Thefollowing sub steps are used:

    •Load the data•Divide data into Training, Validation

    and Test data•Calculate the minimum and maximum

    values in the attribute of input andsetting the various parameters of feed-forward back-propagation network bylike:• Size of the Neural Network• Type of Transfer function of each

    layer to be used• Type of learning function•Generate the Neural Network•Perform the training of the Neural

  • 130 Chiang Mai J. Sci. 2011; 38 (Special Issue)

    Network using the training dataset.Training is accomplished by sending agiven set of inputs through the networkand comparing the results with a set oftarget outputs.•If there is a difference between the

    actual and target outputs, the weightsare adjusted to produce a set of outputscloser to the target values.•Network weights are determined by

    adding an error correction value to theold weight and the biasness value is alsoadjusted. Training stops when any ofthese conditions occurs:• The maximum number of epochs

    (repetitions) is reached.• The maximum amount of time is

    exceeded.• Performance is minimized to the goal.• The performance gradient falls below

    minimum value set.• Validation performance has increased

    more than maximum fail times sincethe last time it decreased (when usingvalidation).

    4.2.2 Phase IIThis phase is a Testing phase. In this step

    the trained Neural Network is evaluatedagainst the testing data on the different criteriaas described in the next step.

    4.3 Comparison CriteriaThe comparisons are made on the basis

    of value of MAE, RMSE and Accuracy valuesof the trained neural network model.Different iterations are taken from the dataset then testing is performed and the averagevalue is taken as show in the table1 in results.The details of the MAE and RMSE are givenbelow:

    4.3.1 Mean Absolute Error (MAE)Mean absolute error, MAE is the average

    of the difference between predicted andactual value in all test cases; it is the averageprediction error [28]. The formula for calcu-lating MAE is given in equation shown below:

    (4.7)

    Assuming that the actual output is a,expected output is c.

    4.3.2 Root Mean-Squared Error (RMSE)RMSE is frequently used measure of

    differences between values predicted by amodel or estimator and the values actuallyobserved from the thing being modeled orestimated [29]. It is just the square root of themean square error as shown in equation givenbelow:

    (4.8)

    4.4 Conclusions DrawnThe conclusions are made on the basis

    of the results calculated in the previous section.

    5 IMPLEMENTATION AND RESULTSIn this paper, the implementation of the

    algorithm is done in Matlab7.4 environmentand the PSO trained Neural Network particleswarm optimization toolbox for Matlab [30]is used. The dataset is collected and dividedinto training and testing exemplars.

    Size of the feed-forward back-propagation Neural Network is set as [5 5 1]means there are 5 neurons in the Input layer,5 neurons in the hidden layer and one neuronin the output layer of the network. The Lineartransfer function is the type of Transferfunction used for the last layer and Hyperbolictangent sigmoid transfer function is used forthe rest of layer of the designed neuralnetwork. Gradient descent with momentumweight and bias learning function is used asBack propagation weight/bias learning

  • Chiang Mai J. Sci. 2011; 38 (Special Issue) 131

    function.TRAINPSO type of Back-propagation

    network training function is used asTRAINPSO is a network training function thatupdates weight and bias values according toparticle swarm optimization. The followingare the additional parameters values used:

    •maximum iterations: 200•population size: 25•acceleration constants (for type = 0): [2,2]•inertia weights (for type = 0): [0.9,0.4];•minimum error gradient: 1e-9;•Iterations at error grad value before exit:

    floor(0.2*trainParam.maxit)•error goal: 0;•Type of PSO: TreleaAfter the training, the Architecture of

    Feed Forward Neural Network is shown inFigure 1 where the Bright Green line showsmore positive weight, bright red line showsmore negative weight and dashed white lineshows zero weight i.e. no connection betweenthe neurons. In the testing phase MAE, RMSEand Accuracy values of the system are 0.20816,0.24007, and 74% respectively as shown inTable 1.

    Figure 1. Architecture of feed forward neural network.

  • 132 Chiang Mai J. Sci. 2011; 38 (Special Issue)

    Figure 2. Graph between Gbest value and Iteration index.

    During the testing of the developedsystem 0.20816, 0.24007 and 74 are calculatedas MAE, RMSE and Accuracy values for thetesting dataset as shown in Table 1.

    Table 2. Iteration-wise testing results ofconjugate gradient algorithms conjugategradient algorithms.

    Iterationsno. Accuracy MAE RMSE

    1 70 0.2121 0.25762 80 0.1638 0.19653 100 0.1190 0.14294 70 0.2263 0.25745 70 0.2267 0.25786 70 0.2287 0.26017 70 0.2253 0.25648 70 0.2250 0.25629 70 0.2255 0.256610 70 0.2292 0.2592

    Average 74 0.20816 0.24007

    Table 1. Iteration wise Results of the NPSOsystem on the basis of the proposed criteria.

    AlgorithmIterations Accuracy MAE RMSE

    no.1 80 0.0458 0.06052 80 0.0414 0.0523

    FRUCG 3 70 0.0439 0.05084 80 0.0305 0.04445 80 0.0414 0.04811 70 0.0418 0.04902 60 0.0514 0.0612

    PRUCG 3 60 0.0577 0.07004 80 0.0399 0.04575 70 0.0488 0.05421 70 0.0435 0.04962 70 0.0520 0.0608

    PBRCG 3 70 0.0500 0.05934 70 0.0490 0.05745 80 0.0367 0.04991 70 0.0407 0.04962 90 0.0409 0.0475

    SCG 3 80 0.0383 0.05154 90 0.0391 0.04835 90 0.0402 0.0451The Table 2 shows the Iteration-wise, 5

    iterations, testing results of Fletcher–ReevesUpdate Conjugate Gradient (FRUCG)algorithm, Polak -Ribiere update ConjugateGradient (PRUCG) algorithm,Powell -BealeRestarts Conjugate Gradient (PBRCG)algorithm and Scaled Conjugate Gradient(SCG) algorithm in terms of Accuracy, MAEand RMSE values.

    The training Performance of Fletcher–Reeves Update Conjugate Gradient (FRUCG)algorithm, Polak -Ribiere update ConjugateGradient (PRUCG) algorithm,Powell -BealeRestarts Conjugate Gradient (PBRCG)algorithm and Scaled Conjugate Gradient(SCG) algorithm is shown with help of graph

  • Chiang Mai J. Sci. 2011; 38 (Special Issue) 133

    Figure 3.Training performance of fletcher -reeves update conjugate gradient algorithm.

    Figure 4. Training performance of Polak–Ribiere update conjugate gradient (PRUCG)algorithm.

    Figure 5. Training performance of Powell-Beale restarts conjugate gradient (PBRCG)algorithm.

    Figure 6. Training performance of scaledconjugate gradient (SCG) algorithm.

    of Mean Square Error value (MSE) versustraining Epoch number in Figures 2, 3, 4 and5 respectively.

    The Table 3 shows the average Accuracy,MAE and RMSE values of 5 iterations testingresults of Fletcher–Reeves Update ConjugateGradient (FRUCG) algorithm,Polak-Ribiereupdate Conjugate Gradient (PRUCG)algorithm, Powell -Beale Restarts ConjugateGradient (PBRCG) algorithm and ScaledConjugate Gradient (SCG) algorithm.

    Table 3. Average testing results of conjugategradient algorithms.

    AlgorithmMean Mean Mean

    Accuracy MAE RMSEFRUCG 78 0.0406 0.05122PRUCG 68 0.04792 0.05602PBRCG 72 0.04624 0.0554SCG 84 0.03984 0.0484NN-PSO 74 0.20816 0.24007

  • 134 Chiang Mai J. Sci. 2011; 38 (Special Issue)

    6. CONCLUSIONIn this paper, it is Feed Forward Neural

    Network trained with Particle SwarmOptimization Algorithm and four types ofConjugate Gradient algorithms are used toevaluate the reusability of procedure orientedsoftware systems. The performance of FeedForward Neural Network trained with ScaledConjugate Gradient (SCG) algorithm comesout to be the best with MAE, RMSE andAccuracy values of 0.03984, 0.0484 and 84%respectively and it has outperformed the threeother types of Conjugate Gradient algorithmsas well as PSO trained Neural Network. Theresults obtained using proposed system isbetter than the results mentioned in literature[18] and [19]. The second best performanceis of Fletcher–Reeves Update ConjugateGradient (FRUCG) algorithm with MAE,RMSE and Accuracy values of 0.0406, 0.05122and 78% respectively. Hence, the proposedsystem can be used for the evaluation ofreusability of the procedure based systems.

    The future work can be extended infollowing directions:

    • This work can be extended to otherprogramming languages.

    • More algorithms can be evaluated andthen we can find the best algorithm.

    • Other dimensions of quality ofsoftware can be considered for mapping therelation of attributes.

    REFERENCES

    [1] Smith E., Al-Yasiri A. and Merabti M.,“A Multi-Tiered Classification SchemeFor Component Retrieval,” Proc.Euromicro Conference, 1998; 24(2):25-27, 882-889.

    [2] Basili V.R., “Software Development: AParadigm for the Future,” Proc.COMPAC ‘89, Los Alamitos, Calif.:IEEE CS Press, 1989; 471- 485.

    [3] Boehm B.W. and Ross R., “Theory-WSoftware Project Management: Principlesand Examples,” IEEE Trans. SoftwareEng., 1989; 15(7): 902.

    [4] Lim W., “Effects of Reuse on Quality,Productivity, and Economics,” IEEESoftware, 1994; 11(5): 23-30.

    [5] Mili H., Mili F. and Mili A., “ReusingSoftware: Issues And ResearchDirections,” IEEE Transactions onSoftware Engineering, 1995; 21(6) 528-562.

    [6] Caldiera G. and Basili V. R., “Identifyingand Qualifying Reusable SoftwareComponents”, IEEE Computer, 1991;61-70.

    [7] Humphrey W., Managing the SoftwareProcess, SEI Series in SoftwareEngineering, Addison-Wesley, 1989.

    [8] Sommerville L., Software Engineering,Addision-Wesley, 4th Edition, 1992.

    [9] Pressman R.S., Software Engineering: APractitioner’s Approach, McGraw-HillPublications, 5th edition, 2005.

    [10] Boetticher G. and Eichmann D., “ANeural Network Paradigm forCharacterising Reusable Software,”Proceedings of the 1st AustralianConference on Software Metrics, 18-19November 1993.

    [11] Poulin J.S., Measuring Software Reuse–Principles, Practices and EconomicModels, Addison-Wesley, 1997.

    [12] Selby R.W., Empirically AnalyzingSoftware Reuse in a ProductionEnvironment in Software Reuse:Emerging Technology, W. Tracz, ed.,IEEE Computer Society Press, 1988.

    [13] Selby Richard W., “Enabling Reuse-BasedSoftware Development of Large-ScaleSystems”, IEEE Trans. on Software Eng.,2005; 31(6): 495-510.

  • Chiang Mai J. Sci. 2011; 38 (Special Issue) 135

    [14] Reformat M., Prdrycz W. and Pizzi N.J.,“Software Quality Analysis with use ofComputational Intelligence”, Journal ofInformation and Software Technology,2003; 45: 405-417.

    [15] Prieto-Diaz and Ruben Freeman P.,“Classifying Software for Reusability”,IEEE Software, 1987; 4(1): 6-16.

    [16] Birge B., “PSOt - a particle swarmoptimization toolbox for use withMatlab”, IEEE Proceedings of SwarmIntelligence Symposium SIS ‘03., 2004.

    [17] http://www.swarmintelligence.org/tutorials.php

    [18] Parvinder Singh Sandhu and HardeepSingh, “Automatic Reusability Appraisalof Software Components using Neuro-Fuzzy Approach”, International JournalOf Information Technology, 2006, 3(3):209-214..

    [19] Parvinder Singh Sandhu and HardeepSingh, “Software Reusability Model forProcedure Based Domain-SpecificSoftware Components”, InternationalJournal of Software Engineering &Knowledge Engineering (IJSEKE),2008; 18(7): 1-19.

    [20] MaCabe T., “A Software Complexitymeasure”, IEEE Trans. Software Eng.,1976; 2: 308-320.

    [21] Caldiera G. and Basili V.R., Identifyingand Qualifying Reusable SoftwareComponents, IEEE Computer, 1991;61-70.

    [22] Fletcher R. and Reeves C.M., “Functionminimization by conjugate gradients,”Computer Journal, 1964; 7: 149-154.

    [23] Hagan M.T., Demuth H.B. and BealeM.H., Neural Network Design, Boston,MA: PWS Publishing, 1996.

    [24] Website: www.mathworks.com/help

    [25] Powell, Mathematical Programming,1977; 12: 241-254.

    [26] Beale E.M.L., “A derivation of conjugategradients,” in F.A. Lootsma, Ed.,Numerical methods for nonlinearoptimization, London: Academic Press,1972.

    [27] Moller, Neural Networks, 1993; 6: 525-533.

    [28] herenji H.R. and Khedkar P., “Learningand Tuning Fuzzy Logic Controllersthrough Reinforcements”, IEEETransactions on Neural Networks, 1992;3: 724-740.

    [29] Challagulla V.U.B., Bastani F.B. and I-LingYen Paul, “Empirical assessment ofmachine learning based software defectprediction techniques”, 10th IEEEInternational Workshop on Object-Oriented Real-Time DependableSystems, WORDS 2005; 263-270.

    [30] Birge B., “PSOt - a particle swarmoptimization toolbox for use withMatlab”, IEEE Proceedings of SwarmIntelligence Symposium SIS ’03., 2003.

    /ColorImageDict > /JPEG2000ColorACSImageDict > /JPEG2000ColorImageDict > /AntiAliasGrayImages false /CropGrayImages true /GrayImageMinResolution 300 /GrayImageMinResolutionPolicy /OK /DownsampleGrayImages true /GrayImageDownsampleType /Bicubic /GrayImageResolution 300 /GrayImageDepth -1 /GrayImageMinDownsampleDepth 2 /GrayImageDownsampleThreshold 1.50000 /EncodeGrayImages true /GrayImageFilter /DCTEncode /AutoFilterGrayImages true /GrayImageAutoFilterStrategy /JPEG /GrayACSImageDict > /GrayImageDict > /JPEG2000GrayACSImageDict > /JPEG2000GrayImageDict > /AntiAliasMonoImages false /CropMonoImages true /MonoImageMinResolution 1200 /MonoImageMinResolutionPolicy /OK /DownsampleMonoImages true /MonoImageDownsampleType /Bicubic /MonoImageResolution 1200 /MonoImageDepth -1 /MonoImageDownsampleThreshold 1.50000 /EncodeMonoImages true /MonoImageFilter /CCITTFaxEncode /MonoImageDict > /AllowPSXObjects false /CheckCompliance [ /None ] /PDFX1aCheck false /PDFX3Check false /PDFXCompliantPDFOnly false /PDFXNoTrimBoxError true /PDFXTrimBoxToMediaBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXSetBleedBoxToMediaBox true /PDFXBleedBoxToTrimBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXOutputIntentProfile () /PDFXOutputConditionIdentifier () /PDFXOutputCondition () /PDFXRegistryName () /PDFXTrapped /False

    /Description > /Namespace [ (Adobe) (Common) (1.0) ] /OtherNamespaces [ > /FormElements false /GenerateStructure true /IncludeBookmarks false /IncludeHyperlinks false /IncludeInteractive false /IncludeLayers false /IncludeProfiles true /MultimediaHandling /UseObjectSettings /Namespace [ (Adobe) (CreativeSuite) (2.0) ] /PDFXOutputIntentProfileSelector /NA /PreserveEditing true /UntaggedCMYKHandling /LeaveUntagged /UntaggedRGBHandling /LeaveUntagged /UseDocumentBleed false >> ]>> setdistillerparams> setpagedevice