正在加载图片...
TABLE I In the first step a set of candidate is chosen. This set is EVOLUTION OF 3 GENERATIONS IN GENETIC ALGORITHM omposed by users with higher chances to be recommended Iteration Optimization in relation to the central user. In the second step, the index measures between each candidate and the central user is 58 27, 341 evaluated once, then the genetic algorithm is used to select the best weight combination to balance the indexes for each 7207 叫2700 candidate. Below the summary of the main code used for th 12 147 18,706 genetic algorithm procedure is presented. 8400 The main procedure that return the best weight combination for recommend friends for a specific user: 142 11,129 Generate an initial population with random weight Until the fitness function value of the best Example of the weights obtained with algorithm. The goal is to minimize the value of the optimization function. individual of the population do not improve for four generations, d e In Table I three iterations of the evolutionary process is o Evaluate the fitness function for each shown. The interaction occurs until the convergence criteria individual in the popular are satisfied. Only the top 3 combinations of weights in each o Exclude the worst individuals in the generation are shown. In the last column the number population according the fitmess function represent the value of the function optimization for each weight combination. Figure 6 shows a graphical o Generate new individuals applying representation of the optimization function of the best crossover in remaining individuals weights combination in each generation. The gray color o Apply mutation operations on children represents the classification of the nodes already connected o Merge children and parents eliminating to the central node. The black color represents the average duplicates. classification of all nodes in gray, in other words the fitness function value. And the white color represents the nodes that are not connected to the central node, i.e. nodes that will be The function to generate population sons from two parents Posit I"iteration 2 Iteration iTeration n"Iteration Crossover is applied over each pair from the Cartesian product of individual of the elite Crossover is applied on same chromosomes type of two parents. Two chromosomes gen nerate two nel chromosomes, and the combination of three chromosomes from each parent six different new performed in a single random cutoff point The fitness function, considering the candidate set of users as the real candidates plus all friends already connected to the central user. Also all three indexes between each candidate and the central user are evaluated, this procedure Is summarized for the best weights in each iteration of the example in the table. The weight combination is received as parameter and normalized This step was developed using the TSQL and SQL Server For each candidate, the weighted average is 2008 database. As the network is considered small. it takes evaluated using indexes and a set of weigh no more than 20 seconds however the time can increase The result set is sorted in descending order over th depending on the network size. Below, we describe part of the algorithm focusing on genetic algorithm procedure. weighted average measure Below it is described the recommendation process for A new set is created selecting the position of all the only one user. The experiment is executed for a set of user, andidates that are friends of the central user i.e. so the recommendation process is performed for each one of that are already connected to it. The fitness function measure is defined as th average of all entries in the previous setTABLE I EVOLUTION OF 3 GENERATIONS IN GENETIC ALGORITHM Iteration 1 st Weight 2 nd Weight 3 rd Weight Optimization function 1 st 71 69 134 27,341 247 58 104 35,089 104 7 32 43,764 2 nd 75 12 147 18,706 87 10 104 21,142 104 7 200 25,997 3 rd 70 10 155 10,975 70 11 142 11,129 71 11 141 11,439 n th … … … … Example of the weights obtained with three iterations using genetic algorithm. The goal is to minimize the value of the optimization function. In Table 1 three iterations of the evolutionary process is shown. The interaction occurs until the convergence criteria are satisfied. Only the top 3 combinations of weights in each generation are shown. In the last column the numbers represent the value of the function optimization for each weight combination. Figure 6 shows a graphical representation of the optimization function of the best weights combination in each generation. The gray color represents the classification of the nodes already connected to the central node. The black color represents the average classification of all nodes in gray, in other words the fitness function value. And the white color represents the nodes that are not connected to the central node, i.e. nodes that will be recommended. Fig. 7. Graphical representation of the values of the optimization functions for the best weights in each iteration of the example in the table. This step was developed using the TSQL and SQL Server 2008 database. As the network is considered small, it takes no more than 20 seconds, however the time can increase depending on the network size. Below, we describe part of the algorithm focusing on genetic algorithm procedure. Below it is described the recommendation process for only one user. The experiment is executed for a set of user, so the recommendation process is performed for each one of this group. In the first step a set of candidate is chosen. This set is composed by users with higher chances to be recommended in relation to the central user. In the second step, the index measures between each candidate and the central user is evaluated once, then the genetic algorithm is used to select the best weight combination to balance the indexes for each candidate. Below the summary of the main code used for the genetic algorithm procedure is presented. The main procedure that return the best weight combination for recommend friends for a specific user: • Generate an initial population with random weight values. • Until the fitness function value of the best individual of the population do not improve for four generations, do: o Evaluate the fitness function for each individual in the population. o Exclude the worst individuals in the population according the fitness function value. o Generate new individuals applying crossover in remaining individuals. o Apply mutation operations on children. o Merge children and parents eliminating duplicates. • Return the weight combination of the best individual The function to generate population sons from two parents is summarized as: • Crossover is applied over each pair from the Cartesian product of individual of the elite population. • Crossover is applied on same chromosomes type of two parents. Two chromosomes generate two new chromosomes, and the combination of three chromosomes from each parent six different new individual can be generated. Crossover is performed in a single random cutoff point The fitness function, considering the candidate set of users as the real candidates plus all friends already connected to the central user. Also all three indexes between each candidate and the central user are evaluated, this procedure is summarized: • The weight combination is received as parameter and normalized. • For each candidate, the weighted average is evaluated using indexes and a set of weight. • The result set is sorted in descending order over the weighted average measure. • A new set is created selecting the position of all the candidates that are friends of the central user i.e. that are already connected to it. • The fitness function measure is defined as the average of all entries in the previous set 237
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有