1   /***
2    * 
3    */
4   package yawn.optim.genetic;
5   
6   import junit.framework.TestCase;
7   import yawn.config.NeuralNetworkConfig;
8   import yawn.nn.AbstractCircleInTheSquareNetworkTest;
9   import yawn.nn.fuzzyartmap.FuzzyArtMapConfig;
10  
11  /***
12   * This is yawn.optim.genetic.GeneticParameterFitterTest, part of the yawn
13   * project.
14   * 
15   * <p>$Id: GeneticParameterFitterTest.java,v 1.3 2005/04/20 18:55:20 supermarti Exp $</p>
16   * 
17   * @author Luis Mart&iacute; (luis dot marti at uc3m dot es)
18   * @version $Revision: 1.3 $
19   */
20  public class GeneticParameterFitterTest extends AbstractCircleInTheSquareNetworkTest {
21  
22      /***
23       * @see TestCase#setUp()
24       */
25      protected void setUp() throws Exception {
26          super.setUp();
27      }
28  
29      /***
30       * @see yawn.nn.AbstractNeuralNetworkTest#createConfig()
31       */
32      protected NeuralNetworkConfig createConfig() {
33          GeneticParameterFitterConfig config = new GeneticParameterFitterConfig();
34          config.setMaxGenerations(20);
35          config.setPopulationSize(10);
36          config.setPreserveFittestIndividual(false);
37          
38  
39          FuzzyArtMapConfig conf = new FuzzyArtMapConfig();
40  
41          conf.setMaxEpochs(10);
42  
43          conf.setAlphaArtA(0.00000001);
44          conf.setBetaArtA(0.8);
45          conf.setVigilanceArtA(0.95);
46  
47          conf.setAlphaArtB(0.00000001);
48          conf.setBetaArtB(0.8);
49          conf.setVigilanceArtB(1);
50  
51          conf.setUseComplementCoding(true);
52          conf.setEpsilon(0.001);
53          conf.setMatchError(0.0005);
54  
55          config.setModeltoBeFittedConfig(conf);
56  
57          return config;
58      }
59  
60  }