[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


gafit Source code in cafe_gafit.pro

gafit

Name
           gafit
Purpose
           perform genetic algorithm fit process of given model to data
Category
           cafe
SYNTAX:
           gafit, [,/selected][,/quiet][,/nodata]
Input Parameters

OPTIONS:
           quiet      - Do not show fit processing.
           selected   - Apply fit to selected data points only.
           nodata     - Take also models into account which are in
                        groups containing no data. May be usefull
                        when building complex models refering one to
                        other.
           nosave     - Do not save intermediate population
                        parameters in separate group. The default is
                        false, i.e. save the data.
           cont       - Continue with population saved last run (if
                        nosave is not set).
SETUP:
           All inputs/options may be set with the "set" command. The
           command prefix is "gafit".
           iternum    - Number of iterations to perform. Default:
                        100.
           popnum     - Size of the population. Default: 100
           childnum   - Number of children of next generation. Must
                        be >=2. Default: 3
           mutrate    - Mutation rate. That is the probability that a
                        mutation occurs. Default: 0.01
          selpresaure - Factor defining the selection pressure during
                        each run. 0 means no pressure at all
                        (selection is done pure randomly and should
                        not be used), 1 means equal random/fittness
                        selection. Higher values increase influence
                        of fittness. Default: 0.5 (more randomness
                        but existing selective pressure).
          twinmutrate - Mutation rate to change equal individuums
                        with. Default: 0.5
          elitism_num - Number of best-fit individuums to keep and
                        not overwrite/mutate. Default: 1.
           maxchange  - Maximal number chi^2 does not change till
                        stop.
           testnum    - Set this number to values > 1 to run the
                        fitting more than once to get more confidence
                        of the results. Best fit value will be
                        reported.
           iterplot   - Plot for each population current plot with
                        best fit parameters. This plot might
                        represent intermediate results.
        iterplotout   - Try to plot out intermediate results.
Description
           The gafit command performs genetic algorithm fit process
           resembling the one being described in Charbonneau, 1995.
           Here a much simpler verison is used which performs
           following steps:
           1.) create population consisting of individuums who are
               described by parameters which are the fit parameters
               (the genotype). The phaenotype is the model function
               value which has to be fit to the data (the environment).
           2.) Each population is randomly separated into two parents
               which are to be maried.
           3.) Some (>2) children are generated from the parents
               which inherit the parameter from either
               mother/father (randomly).
           4.) With a certain mutation rate some parameters are
               changed.
           5.) All individuums of the next generation are tested for
               the environment (=data). Best matching one are kept.
           6.) Individuums which have the same parameters as other
               will be deposited with an additional mutation.
           7.) Repeat that till either the best fit value does not
               change for more that certain iterations or chi_red is
               less than 1.
           It is important to double-side limit all relevant
           parameters, otherwise an error is reported. Use the
           "limit"/"show,limit" command to do that.
           During fitting parameter handling is as follows:
           - if a parameter is frozen (fixed flag = 1) the parameter
             will not be touched while fitting.
           - tied parameters are not supported currently.
           - groups which contain a model but no valid data points
             are ignored. In case of the selected flag (s.a.) only
             selected data points are taken into account, i.e. if no
             data points are selected the group is ignored.
           - groups which contain valid data points but no model are
             ignored.
Side Effects
           Changes parameter values/errors in environment
           according fit result.
REMARK:
           Long lasting fit processes may be interrupted with "Q".
           This task may take its cpu!
Example
               > model, ...
               > gafit
                 -> fit result
               > plot,data+model,res
Revision History
           $Id: cafe_gafit.pro,v 1.20 2004/11/01 16:19:29 goehler Exp $

Last modified by pro2html on 2005 January 04 at 16:04 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically