Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial:heuristic_calibration_of_models_by_using_genetic_algorithm [2013/07/27 20:06]
juliana
tutorial:heuristic_calibration_of_models_by_using_genetic_algorithm [2013/07/30 01:42]
juliana
Line 11: Line 11:
  
  
-Within the class of hard predictors (Eastman et al., 2005), the Genetic Algorithm (GA) tool provides a powerful means of calibrating environmental models. By mimicking the principle of biological evolution (Koza, 1992), GA tool uses massive computing and heuristics to seek for a global optimum solution for a set of model parameters. Dinamica EGO´s GA tool consists of a container, which requires the placement of a sequence of functors within it and, in particular, of two associated functors: //Get Current Individual//​ and //Set Fitness//. Fig. 1 depicts a model calibration scheme using GA tool. First, one needs to get the coefficients from the model parameters to be calibrated and assemble these coefficients in tables. Thus each model parameter will represent an allele in a table that corresponds to a gene. In turn, these tables are assembled by using //Create Lookup Table// Group in a group of tables to form a chromosome. This group of tables is an input to GA tool. GA tool spawns a population based on the genotype passed in a group table. Inside GA tool, Get Current Individual is placed to get the genes from the individuals of a generation. Other functors, such as //Extract Lookup Table from Lookup Table Group//, are sequenced to catch the parameter coefficients and pass them to the model, which is executed once per individual. An evaluation function is coupled to the output of the model and its result is passed to Set Fitness, which returns the fitness value to GA tool for the selection process. The internal sequence of functors will iterate a number of times equal to the number of individuals multiplied by generations,​ as specified in GA tool´s input ports. When GA tool terminates, it will output the fitness of the overall best individual as well as the group of tables that comprises its genes. ​+The Genetic Algorithm (GA) tool provides a powerful means of calibrating environmental models[[http://​dx.doi.org/​10.1016/​j.envsoft.2013.01.010|( Soares Filho et al., 2013)]]. By mimicking the principle of biological evolution (Koza, 1992), GA tool uses massive computing and heuristics to seek for a global optimum solution for a set of model parameters. Dinamica EGO´s GA tool consists of a container, which requires the placement of a sequence of functors within it and, in particular, of two associated functors: //Get Current Individual//​ and //Set Fitness//. Fig. 1 depicts a model calibration scheme using GA tool. First, one needs to get the coefficients from the model parameters to be calibrated and assemble these coefficients in tables. Thus each model parameter will represent an allele in a table that corresponds to a gene. In turn, these tables are assembled by using //Create Lookup Table// Group in a group of tables to form a chromosome. This group of tables is an input to GA tool. GA tool spawns a population based on the genotype passed in a group table. Inside GA tool, //Get Current Individual// is placed to get the genes from the individuals of a generation. Other functors, such as //Extract Lookup Table from Lookup Table Group//, are sequenced to catch the parameter coefficients and pass them to the model, which is executed once per individual. An evaluation function is coupled to the output of the model and its result is passed to //Set Fitness//, which returns the fitness value to GA tool for the selection process. The internal sequence of functors will iterate a number of times equal to the number of individuals multiplied by generations,​ as specified in GA tool´s input ports. When GA tool terminates, it will output the fitness of the overall best individual as well as the group of tables that comprises its genes. ​
  
    
Line 46: Line 46:
 **t1[line] + t1[line] * 1.2** **t1[line] + t1[line] * 1.2**
  
-The use of these tables as gene bounds will constrain the new genes to an envelope of ±1.2 times the values of the original weights of evidence coefficients,​ thus providing a trend around which the global optimum solution must be found. Although this constraint will result in lower calibration scores (Run “validation_fitness1x1.ego” located in GALimitedRanges120%\Reciprocal_fitness1x1”),​ it will tame the //GA tool// engine, allowing it to improve the Weights of Evidence result for application to a general prediction process (Figs. 2, 2).    ​+The use of these tables as gene bounds will constrain the new genes to an envelope of ±1.2 times the values of the original weights of evidence coefficients,​ thus providing a trend around which the global optimum solution must be found. Although this constraint will result in lower calibration scores (Run “validation_fitness1x1.ego” located in GALimitedRanges120%\Reciprocal_fitness1x1”),​ it will tame the //GA tool// engine, allowing it to improve the Weights of Evidence result for application to a general prediction process (Figs. 2 and 3).    ​
  
 In conclusion, hard predictors like GA tool must incorporate prior knowledge in order to overcome overspecialization. When this is taken into consideration,​ GA tool can really push the envelope of model optimization. ​ Use your expertise to develop other GA tool calibration processes following the scheme of Fig. 1 and examples provided. In conclusion, hard predictors like GA tool must incorporate prior knowledge in order to overcome overspecialization. When this is taken into consideration,​ GA tool can really push the envelope of model optimization. ​ Use your expertise to develop other GA tool calibration processes following the scheme of Fig. 1 and examples provided.
Line 56: Line 56:
 [{{ :​tutorial:​ga_ 5.1.jpg |Fig.3- ​ a) Transition probability map from Weights of Evidence (blue: low probability,​ red: high probability),​ b) Simulated changes (red) by using map from a) over historical changes from 1997 to 2000 (black). c) Transition probability map using weights output from Genetic Algorithm tool limited within a 120% envelope. d) Simulated changes (red) using map from b) over historical changes from 1997 to 2000 (black). e) Weights of evidence of deforestation as a function of distance to previously deforested areas (WofE- Weights of Evidence method, GAknn - GA sole method, others: GA with values limited, respectively,​ within 80% and 120% envelope of original weights of evidence values, ​ f ) Simulated changes (red) using map from c) over historical changes from 2000 to 2003 (black).}}] [{{ :​tutorial:​ga_ 5.1.jpg |Fig.3- ​ a) Transition probability map from Weights of Evidence (blue: low probability,​ red: high probability),​ b) Simulated changes (red) by using map from a) over historical changes from 1997 to 2000 (black). c) Transition probability map using weights output from Genetic Algorithm tool limited within a 120% envelope. d) Simulated changes (red) using map from b) over historical changes from 1997 to 2000 (black). e) Weights of evidence of deforestation as a function of distance to previously deforested areas (WofE- Weights of Evidence method, GAknn - GA sole method, others: GA with values limited, respectively,​ within 80% and 120% envelope of original weights of evidence values, ​ f ) Simulated changes (red) using map from c) over historical changes from 2000 to 2003 (black).}}]
  
- +[[tutorial:​dinamica_ego_script_language_and_console_launcher|Next Session]]