SlideShare a Scribd company logo
The HeLIx+ inversion code
Genetic algorithms




                            A. Lagg - Abisko Winter School 1
Inversion of the RTE
    Once solution of RTE is known:
     comparison between Stokes spectra of synthetic and observed
      spectrum
     trial-and-error changes of the initial parameters of the atmosphere
      („human inversions“)
     until observed and synthetic (fitted) profile matches
    Inversions:
      Nothing else but an optimization of the trial-and-error part
    Problem:
      Inversions always find a solution within the given model
      atmosphere. Solution is seldomly unique (might even be
      completely wrong).

    Goal of this lecture:
     Principles of genetic algorithms
     Learn the usage of the HeLIx+ inversion code, develop a feeling
     on the reliability of inversion results.

                                                         A. Lagg - Abisko Winter School 2
The merit function

     The quality of the model atmosphere must be evaluated
     Stokes profiles represent discrete sampled functions
     widely used: chisqr definition




                                                                  weight
                                      sum over                (also WL-dep)
                         sum over
                                      WL-pixels
        number of free    Stokes
         parameters

      RTE gives the Stokes spectrum Issyn
    
     The unknowns of the system are the (height dependent) model
      parameters:



                                                     A. Lagg - Abisko Winter School 3
HeLIx+ overview of features

    includes Zeeman, Paschen-Back, Hanle effect (He 10830)
  
   atomic polarization for He 10830 (He D3)
   magneto-optical effects
   fitting / removing telluric lines
   fitting unknown parameters of spectral lines
   various methods for continuum correction / fitting
   convolution with instrument filter profiles
   user-defined weighting scheme
   direct read access to SOT/SP, VTT-TIP2, SST-CRISP, ...
   flexible atomic data configuration
   extensive IDL based display routines
   MPI support (to invert maps)
  Download from http://www.mps.mpg.de/homes/lagg
    GBSO download-section  helix
    use invert and IR$soft
                                                A. Lagg - Abisko Winter School 4
The inversion technique: reliability
Two minimizations
                                   steepest gradient
                                     Pikaia
 implemented:
 Levenberg-Marquardt:
  requires good initial
 guess
 PIKAIA (genetic
 algorithm, Charbonneau
 1995):
  no initial guess needed
 planned: DIRECT
 algorithm (good
 compromise between
 global min and speed)




                                                A. Lagg - Abisko Winter School 5
Initial guess problem

    Having a good initial guess for the iteration process improves both
    the speed and the convergence of the inversion.




                                                         A. Lagg - Abisko Winter School 6
Initial guess optimizations

    Weak field initialization              Auer77 initialization




    Other methods:
     Artificial Neural Networks (ANN)
     MDI / magnetograph formulae
     use a minimization technique which does not rely on initial
      guess values
                                                     A. Lagg - Abisko Winter School 7
Genetic algorithms                                  P. Spijker, TU Eindhoven


        Genetic algorithms (GA‟s) are a
    
        technique to solve problems which need
        optimization
        GA‟s are a subclass of Evolutionary
    
        Computing
        GA‟s are based on Darwin‟s theory of
    
        evolution
        History of GA‟s:
    

            Evolutionary computing evolved in the
        
            1960‟s.
            GA‟s were created by John Holland in
        
            the mid-70‟s.

                                                     A. Lagg - Abisko Winter School 8
Advantages / drawbacks

        No derivatives of the goodness of fit function with
    
        respect to model parameters need be computed; it
        matters little whether the relationship between the
        model and its parameters is linear or nonlinear.
        Nothing in the procedure outlined above depends
    
        critically on using a least-squares statistical estimator;
        any other robust estimator can be substituted, with little
        or no changes to the overall procedure.


        In most real applications, the model will need to be
    
        evaluated (i.e., given a parameter set, compute a
        synthetic dataset and its associated goodness of fit) a
        great many times; if this evaluation is computationally
        expensive, the forward modeling approach can become
        impractical.

                                                    A. Lagg - Abisko Winter School 9
Evolution in biology

     Each cell of a living thing contains chromosomes - strings of
 
     DNA
     Each chromosome contains a set of genes - blocks of DNA
 

     Each gene determines some aspect of the organism (like eye
 
     colour)
      A collection of genes is sometimes called a genotype
      A collection of aspects (like eye colour) is sometimes called a phenotype

     Reproduction involves recombination of genes from parents
 
     and then small amounts of mutation (errors) in copying
     The fitness of an organism is how much it can reproduce
 
     before it dies
     Evolution based on “survival of the fittest”
 



                                                               A. Lagg - Abisko Winter School 10
Biological reproducion

        During reproduction “errors” occur
    

        Due to these “errors” genetic variation exists
    

        Most important “errors” are:
    

            Recombination (cross-over)
        

            Mutation
        




                                                  A. Lagg - Abisko Winter School 11
Natural selection
      The origin of species: “Preservation of favourable
  
      variations and rejection of unfavourable variations.”
      There are more individuals born than can survive, so there
  
      is a continuous struggle for life.
      Individuals with an advantage have a greater chance for
  
      survive: survival of the fittest.
      Important aspects in natural selection are:
  
         adaptation to the environment
         isolation of populations in different groups which cannot
          mutually mate
      If small changes in the genotypes of individuals are
  
      expressed easily, especially in small populations, we speak
      of genetic drift
      “success in life”: mathematically expressed as fitness
  
                                                        A. Lagg - Abisko Winter School 12
How to apply to RTE?                      David Hales (www.davidhales.com)


        GA‟s often encode solutions as fixed length “bitstrings”
    
        (e.g. 101110, 111111, 000101)
        Each bit represents some aspect of the proposed
    
        solution to the problem
        For GA‟s to work, we need to be able to “test” any
    
        string and get a “score” indicating how “good” that
        solution is
        definition of “fitness function” required: convenient to
    
        use chisqr merit function



        GA‟s improve the fitness – maximization technique



                                                    A. Lagg - Abisko Winter School 13
Example – Drilling for oil              David Hales (www.davidhales.com)


        Imagine you had to drill for oil somewhere along a
    
        single 1km desert road
        Problem: choose the best place on the road that
    
        produces the most oil per day
        We could represent each solution as a position on the
    
        road
        Say, a whole number between [0..1000]
    
                Solution1 = 300            Solution2 = 900




            Road

        0                         500                           1000
                                                  A. Lagg - Abisko Winter School 14
Encoding problem
        The set of all possible solutions [0..1000] is called the
    
        search space or state space
        In this case it‟s just one number but it could be many
    
        numbers or symbols
        Often GA‟s code numbers in binary producing a
    
        bitstring representing a solution
        In our example we choose 10 bits which is enough to
    
        represent 0..1000
            512 256 128          64     32    16      8      4        2        1
     900      1     1      1      0     0      0      0      1        0        0
     300      0     1      0      0     1      0      1      1        0        0
    1023      1     1      1      1     1      1      1      1        1        1
         In GA‟s these encoded strings are sometimes called “genotypes” or
        “chromosomes” and the individual bits are sometimes called “genes”
                                                           A. Lagg - Abisko Winter School 15
Fitness of oil function


                 Solution1 = 300          Solution2 = 900
                  (0100101100)             (1110000100)


          Road
    0                                                      1000
    OIL




                          30
                                                  5

                               Location

                                                 A. Lagg - Abisko Winter School 16
Search space

           Oil example: search space is one dimensional
       
           (and stupid: how to define a fitness function?).

           RTE: encoding several values into the
       
           chromosome many dimensions can be
           searched
           Search space an be visualised as a surface or
       
           fitness landscape in which fitness dictates
           height (fitness / chisqr hypersurface)
           Each possible genotype is a point in the space
       

           A GA tries to move the points to better places
       
           (higher fitness) in the space




                                                              A. Lagg - Abisko Winter School 17
Fitness landscapes (2-D)




                           A. Lagg - Abisko Winter School 18
Search space


           Obviously, the nature of the search space
       
           dictates how a GA will perform
           A completely random space would be bad for
       
           a GA
           Also GA‟s can, in practice, get stuck in local
       
           maxima if search spaces contain lots of
           these
           Generally, spaces in which small
       
           improvements get closer to the global
           optimum are good




                                                 A. Lagg - Abisko Winter School 19
The algorithm



            Generate a set of random solutions
        

            Repeat
        

                Test each solution in the set (rank them)
            

                Remove some bad solutions from set
            

                Duplicate some good solutions
            

                make small changes to some of them
            

            Until best solution is good enough
        



                How to duplicate good solutions?


                                                  A. Lagg - Abisko Winter School 20
Adding Sex

     Two high scoring “parent” bit strings
 
                                                              sex
     (chromosomes) are selected and with some
     probability (crossover rate) combined
                                                              result of sex
     Producing two new offsprings (bit strings)
 
                                                             parents are seldom
     Each offspring may then be changed randomly
                                                            happy with the
     (mutation)                                              result

     Selecting parents: many schemes possible,
 
     example:
     Roulette Wheel
      Add up the fitness's of all chromosomes
      Generate a random number R in that range
      Select the first chromosome in the population
       that - when all previous fitness‟s are added -
       gives you at least the value R
                                                  A. Lagg - Abisko Winter School 21
Example population


    No.         Chromosome    Fitness
     1          1010011010       1
     2           1111100001      2
     3          1011001100       3
     4          1010000000       1
     5          0000010000       3
     6           1001011111      5
     7          0101010101       1
     8           1011100111      2
                              sum: 18
                              A. Lagg - Abisko Winter School 22
Roulette Wheel Selection




    1      2         3             4   5             6                 7      8
       1       2          3        1         3             5            1         2




   0               Rnd[0..18] = 7          Rnd[0..18] = 12                            18
                   Chromosome4             Chromosome6
                         Parent1                 Parent2


                   Higher chance of picking a fit chromosome!

                                                               A. Lagg - Abisko Winter School 23
Crossover - Recombination




                                              1011011111
      1010000000     Parent1     Offspring1

                                              1010000000
      1001011111                 Offspring2
                     Parent2

     Crossover
    single point -   With some high probability (crossover
       random        rate) apply crossover to the parents.
                     (typical values are 0.8 to 0.95)




                                               A. Lagg - Abisko Winter School 24
Mutation

                                                     mutate



                                              1011001111
                 1011011111     Offspring1
   Offspring1

                                              1000000000
                 1010000000     Offspring2
   Offspring2

           Original offspring           Mutated offspring



     With some small probability (the mutation rate)
       flip each bit in the offspring (typical values
                 between 0.1 and 0.001)
                                             A. Lagg - Abisko Winter School 25
Improved algorithm


      Generate   a population of random chromosomes
      Repeat (each generation)
        Calculate fitness of each chromosome
        Repeat
          Use roulette selection to select pairs of
            parents
          Generate offspring with crossover and
            mutation
        Until a new population has been produced
      Until best solution is good enough



                                          A. Lagg - Abisko Winter School 26
Many Variants of GA

        Different kinds of selection (not roulette):
    
        Tournament, Elitism, etc.

        Different recombination:
    
        one-point crossover, multi-point crossover, 3 way crossover etc.

        Different kinds of encoding other than bitstring
    
        Integer values, Ordered set of symbols

        Different kinds of mutation
    
        variable mutation rate

        Different reduction plans
    
        controls how newly bred offsprings are inserted into the
        population

    PIKAIA (Charbonneau, 1995)

                                                         A. Lagg - Abisko Winter School 27
How PIKAIA works…




                    A. Lagg - Abisko Winter School 28

More Related Content

Viewers also liked

Fort la Bosse. March 2012.engagement
Fort la Bosse. March 2012.engagementFort la Bosse. March 2012.engagement
Fort la Bosse. March 2012.engagement
Faye Brownlie
 
Mrlc supers nov 2015
Mrlc supers nov 2015Mrlc supers nov 2015
Mrlc supers nov 2015
Faye Brownlie
 
ART 508 Presentation
ART 508 PresentationART 508 Presentation
ART 508 Presentation
r.smith
 
FNSA literacy day 1
FNSA literacy day 1FNSA literacy day 1
FNSA literacy day 1
Faye Brownlie
 
Ciphone Cect I68
Ciphone Cect I68Ciphone Cect I68
Ciphone Cect I68
globwonstore
 
Bulkley Valley-Oct.5.2011
Bulkley Valley-Oct.5.2011Bulkley Valley-Oct.5.2011
Bulkley Valley-Oct.5.2011
Faye Brownlie
 
Prince Rupert.secondary.April
Prince Rupert.secondary.AprilPrince Rupert.secondary.April
Prince Rupert.secondary.April
Faye Brownlie
 
Adolescent learning network
Adolescent learning networkAdolescent learning network
Adolescent learning network
Faye Brownlie
 

Viewers also liked (8)

Fort la Bosse. March 2012.engagement
Fort la Bosse. March 2012.engagementFort la Bosse. March 2012.engagement
Fort la Bosse. March 2012.engagement
 
Mrlc supers nov 2015
Mrlc supers nov 2015Mrlc supers nov 2015
Mrlc supers nov 2015
 
ART 508 Presentation
ART 508 PresentationART 508 Presentation
ART 508 Presentation
 
FNSA literacy day 1
FNSA literacy day 1FNSA literacy day 1
FNSA literacy day 1
 
Ciphone Cect I68
Ciphone Cect I68Ciphone Cect I68
Ciphone Cect I68
 
Bulkley Valley-Oct.5.2011
Bulkley Valley-Oct.5.2011Bulkley Valley-Oct.5.2011
Bulkley Valley-Oct.5.2011
 
Prince Rupert.secondary.April
Prince Rupert.secondary.AprilPrince Rupert.secondary.April
Prince Rupert.secondary.April
 
Adolescent learning network
Adolescent learning networkAdolescent learning network
Adolescent learning network
 

Similar to Arbonne's Results Presentation

Finding Ground States of Sherrington-Kirkpatrick Spin Glasses with Hierarchic...
Finding Ground States of Sherrington-Kirkpatrick Spin Glasses with Hierarchic...Finding Ground States of Sherrington-Kirkpatrick Spin Glasses with Hierarchic...
Finding Ground States of Sherrington-Kirkpatrick Spin Glasses with Hierarchic...
Martin Pelikan
 
23AFMC_Beamer.pdf
23AFMC_Beamer.pdf23AFMC_Beamer.pdf
23AFMC_Beamer.pdf
LorenzoCampoli1
 
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
Xavier Llorà
 
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
Atsushi Nitanda
 
lecture3.pdf
lecture3.pdflecture3.pdf
lecture3.pdf
Tigabu Yaya
 
Linkage Learning for Pittsburgh LCS: Making Problems Tractable
Linkage Learning for Pittsburgh LCS: Making Problems TractableLinkage Learning for Pittsburgh LCS: Making Problems Tractable
Linkage Learning for Pittsburgh LCS: Making Problems Tractable
Xavier Llorà
 
eviewsOLSMLE
eviewsOLSMLEeviewsOLSMLE
eviewsOLSMLE
Elmar Mertens
 
Organizations Use Data
Organizations Use DataOrganizations Use Data
Organizations Use Data
gregoryg
 
Explainable AI
Explainable AIExplainable AI
Explainable AI
Arithmer Inc.
 
Compressed Sensing using Generative Model
Compressed Sensing using Generative ModelCompressed Sensing using Generative Model
Compressed Sensing using Generative Model
kenluck2001
 
PR-297: Training data-efficient image transformers & distillation through att...
PR-297: Training data-efficient image transformers & distillation through att...PR-297: Training data-efficient image transformers & distillation through att...
PR-297: Training data-efficient image transformers & distillation through att...
Jinwon Lee
 
Using HOG Descriptors on Superpixels for Human Detection of UAV Imagery
Using HOG Descriptors on Superpixels for Human Detection of UAV ImageryUsing HOG Descriptors on Superpixels for Human Detection of UAV Imagery
Using HOG Descriptors on Superpixels for Human Detection of UAV Imagery
Wai Nwe Tun
 
Вычислительный эксперимент в молекулярной биофизике белков и биомембран
Вычислительный эксперимент в молекулярной биофизике белков и биомембранВычислительный эксперимент в молекулярной биофизике белков и биомембран
Вычислительный эксперимент в молекулярной биофизике белков и биомембран
Ilya Klabukov
 
Conic Clustering
Conic ClusteringConic Clustering
Conic Clustering
Napat Rujeerapaiboon
 
Barker_SIAMCSE15
Barker_SIAMCSE15Barker_SIAMCSE15
Barker_SIAMCSE15
Karen Pao
 
Pittsburgh Learning Classifier Systems for Protein Structure Prediction: Sca...
Pittsburgh Learning Classifier Systems for Protein  Structure Prediction: Sca...Pittsburgh Learning Classifier Systems for Protein  Structure Prediction: Sca...
Pittsburgh Learning Classifier Systems for Protein Structure Prediction: Sca...
Xavier Llorà
 
Ensembles.pdf
Ensembles.pdfEnsembles.pdf
Ensembles.pdf
Leonardo Auslender
 
Higgs Boson Challenge
Higgs Boson ChallengeHiggs Boson Challenge
Higgs Boson Challenge
Raouf KESKES
 
Toward Optimal Configuration Space Sampling
Toward Optimal Configuration Space SamplingToward Optimal Configuration Space Sampling
Toward Optimal Configuration Space Sampling
cijat
 
Towards Minimal Test Collections for Evaluation of Audio Music Similarity and...
Towards Minimal Test Collections for Evaluation of Audio Music Similarity and...Towards Minimal Test Collections for Evaluation of Audio Music Similarity and...
Towards Minimal Test Collections for Evaluation of Audio Music Similarity and...
Julián Urbano
 

Similar to Arbonne's Results Presentation (20)

Finding Ground States of Sherrington-Kirkpatrick Spin Glasses with Hierarchic...
Finding Ground States of Sherrington-Kirkpatrick Spin Glasses with Hierarchic...Finding Ground States of Sherrington-Kirkpatrick Spin Glasses with Hierarchic...
Finding Ground States of Sherrington-Kirkpatrick Spin Glasses with Hierarchic...
 
23AFMC_Beamer.pdf
23AFMC_Beamer.pdf23AFMC_Beamer.pdf
23AFMC_Beamer.pdf
 
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
 
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
 
lecture3.pdf
lecture3.pdflecture3.pdf
lecture3.pdf
 
Linkage Learning for Pittsburgh LCS: Making Problems Tractable
Linkage Learning for Pittsburgh LCS: Making Problems TractableLinkage Learning for Pittsburgh LCS: Making Problems Tractable
Linkage Learning for Pittsburgh LCS: Making Problems Tractable
 
eviewsOLSMLE
eviewsOLSMLEeviewsOLSMLE
eviewsOLSMLE
 
Organizations Use Data
Organizations Use DataOrganizations Use Data
Organizations Use Data
 
Explainable AI
Explainable AIExplainable AI
Explainable AI
 
Compressed Sensing using Generative Model
Compressed Sensing using Generative ModelCompressed Sensing using Generative Model
Compressed Sensing using Generative Model
 
PR-297: Training data-efficient image transformers & distillation through att...
PR-297: Training data-efficient image transformers & distillation through att...PR-297: Training data-efficient image transformers & distillation through att...
PR-297: Training data-efficient image transformers & distillation through att...
 
Using HOG Descriptors on Superpixels for Human Detection of UAV Imagery
Using HOG Descriptors on Superpixels for Human Detection of UAV ImageryUsing HOG Descriptors on Superpixels for Human Detection of UAV Imagery
Using HOG Descriptors on Superpixels for Human Detection of UAV Imagery
 
Вычислительный эксперимент в молекулярной биофизике белков и биомембран
Вычислительный эксперимент в молекулярной биофизике белков и биомембранВычислительный эксперимент в молекулярной биофизике белков и биомембран
Вычислительный эксперимент в молекулярной биофизике белков и биомембран
 
Conic Clustering
Conic ClusteringConic Clustering
Conic Clustering
 
Barker_SIAMCSE15
Barker_SIAMCSE15Barker_SIAMCSE15
Barker_SIAMCSE15
 
Pittsburgh Learning Classifier Systems for Protein Structure Prediction: Sca...
Pittsburgh Learning Classifier Systems for Protein  Structure Prediction: Sca...Pittsburgh Learning Classifier Systems for Protein  Structure Prediction: Sca...
Pittsburgh Learning Classifier Systems for Protein Structure Prediction: Sca...
 
Ensembles.pdf
Ensembles.pdfEnsembles.pdf
Ensembles.pdf
 
Higgs Boson Challenge
Higgs Boson ChallengeHiggs Boson Challenge
Higgs Boson Challenge
 
Toward Optimal Configuration Space Sampling
Toward Optimal Configuration Space SamplingToward Optimal Configuration Space Sampling
Toward Optimal Configuration Space Sampling
 
Towards Minimal Test Collections for Evaluation of Audio Music Similarity and...
Towards Minimal Test Collections for Evaluation of Audio Music Similarity and...Towards Minimal Test Collections for Evaluation of Audio Music Similarity and...
Towards Minimal Test Collections for Evaluation of Audio Music Similarity and...
 

Recently uploaded

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 

Arbonne's Results Presentation

  • 1. The HeLIx+ inversion code Genetic algorithms A. Lagg - Abisko Winter School 1
  • 2. Inversion of the RTE Once solution of RTE is known:  comparison between Stokes spectra of synthetic and observed spectrum  trial-and-error changes of the initial parameters of the atmosphere („human inversions“)  until observed and synthetic (fitted) profile matches Inversions: Nothing else but an optimization of the trial-and-error part Problem: Inversions always find a solution within the given model atmosphere. Solution is seldomly unique (might even be completely wrong). Goal of this lecture: Principles of genetic algorithms Learn the usage of the HeLIx+ inversion code, develop a feeling on the reliability of inversion results. A. Lagg - Abisko Winter School 2
  • 3. The merit function  The quality of the model atmosphere must be evaluated  Stokes profiles represent discrete sampled functions  widely used: chisqr definition weight sum over (also WL-dep) sum over WL-pixels number of free Stokes parameters RTE gives the Stokes spectrum Issyn   The unknowns of the system are the (height dependent) model parameters: A. Lagg - Abisko Winter School 3
  • 4. HeLIx+ overview of features includes Zeeman, Paschen-Back, Hanle effect (He 10830)   atomic polarization for He 10830 (He D3)  magneto-optical effects  fitting / removing telluric lines  fitting unknown parameters of spectral lines  various methods for continuum correction / fitting  convolution with instrument filter profiles  user-defined weighting scheme  direct read access to SOT/SP, VTT-TIP2, SST-CRISP, ...  flexible atomic data configuration  extensive IDL based display routines  MPI support (to invert maps) Download from http://www.mps.mpg.de/homes/lagg GBSO download-section  helix use invert and IR$soft A. Lagg - Abisko Winter School 4
  • 5. The inversion technique: reliability Two minimizations steepest gradient Pikaia implemented: Levenberg-Marquardt:  requires good initial guess PIKAIA (genetic algorithm, Charbonneau 1995):  no initial guess needed planned: DIRECT algorithm (good compromise between global min and speed) A. Lagg - Abisko Winter School 5
  • 6. Initial guess problem Having a good initial guess for the iteration process improves both the speed and the convergence of the inversion. A. Lagg - Abisko Winter School 6
  • 7. Initial guess optimizations Weak field initialization Auer77 initialization Other methods:  Artificial Neural Networks (ANN)  MDI / magnetograph formulae  use a minimization technique which does not rely on initial guess values A. Lagg - Abisko Winter School 7
  • 8. Genetic algorithms P. Spijker, TU Eindhoven Genetic algorithms (GA‟s) are a  technique to solve problems which need optimization GA‟s are a subclass of Evolutionary  Computing GA‟s are based on Darwin‟s theory of  evolution History of GA‟s:  Evolutionary computing evolved in the  1960‟s. GA‟s were created by John Holland in  the mid-70‟s. A. Lagg - Abisko Winter School 8
  • 9. Advantages / drawbacks No derivatives of the goodness of fit function with  respect to model parameters need be computed; it matters little whether the relationship between the model and its parameters is linear or nonlinear. Nothing in the procedure outlined above depends  critically on using a least-squares statistical estimator; any other robust estimator can be substituted, with little or no changes to the overall procedure. In most real applications, the model will need to be  evaluated (i.e., given a parameter set, compute a synthetic dataset and its associated goodness of fit) a great many times; if this evaluation is computationally expensive, the forward modeling approach can become impractical. A. Lagg - Abisko Winter School 9
  • 10. Evolution in biology Each cell of a living thing contains chromosomes - strings of  DNA Each chromosome contains a set of genes - blocks of DNA  Each gene determines some aspect of the organism (like eye  colour)  A collection of genes is sometimes called a genotype  A collection of aspects (like eye colour) is sometimes called a phenotype Reproduction involves recombination of genes from parents  and then small amounts of mutation (errors) in copying The fitness of an organism is how much it can reproduce  before it dies Evolution based on “survival of the fittest”  A. Lagg - Abisko Winter School 10
  • 11. Biological reproducion During reproduction “errors” occur  Due to these “errors” genetic variation exists  Most important “errors” are:  Recombination (cross-over)  Mutation  A. Lagg - Abisko Winter School 11
  • 12. Natural selection The origin of species: “Preservation of favourable  variations and rejection of unfavourable variations.” There are more individuals born than can survive, so there  is a continuous struggle for life. Individuals with an advantage have a greater chance for  survive: survival of the fittest. Important aspects in natural selection are:   adaptation to the environment  isolation of populations in different groups which cannot mutually mate If small changes in the genotypes of individuals are  expressed easily, especially in small populations, we speak of genetic drift “success in life”: mathematically expressed as fitness  A. Lagg - Abisko Winter School 12
  • 13. How to apply to RTE? David Hales (www.davidhales.com) GA‟s often encode solutions as fixed length “bitstrings”  (e.g. 101110, 111111, 000101) Each bit represents some aspect of the proposed  solution to the problem For GA‟s to work, we need to be able to “test” any  string and get a “score” indicating how “good” that solution is definition of “fitness function” required: convenient to  use chisqr merit function GA‟s improve the fitness – maximization technique A. Lagg - Abisko Winter School 13
  • 14. Example – Drilling for oil David Hales (www.davidhales.com) Imagine you had to drill for oil somewhere along a  single 1km desert road Problem: choose the best place on the road that  produces the most oil per day We could represent each solution as a position on the  road Say, a whole number between [0..1000]  Solution1 = 300 Solution2 = 900 Road 0 500 1000 A. Lagg - Abisko Winter School 14
  • 15. Encoding problem The set of all possible solutions [0..1000] is called the  search space or state space In this case it‟s just one number but it could be many  numbers or symbols Often GA‟s code numbers in binary producing a  bitstring representing a solution In our example we choose 10 bits which is enough to  represent 0..1000 512 256 128 64 32 16 8 4 2 1 900 1 1 1 0 0 0 0 1 0 0 300 0 1 0 0 1 0 1 1 0 0 1023 1 1 1 1 1 1 1 1 1 1 In GA‟s these encoded strings are sometimes called “genotypes” or “chromosomes” and the individual bits are sometimes called “genes” A. Lagg - Abisko Winter School 15
  • 16. Fitness of oil function Solution1 = 300 Solution2 = 900 (0100101100) (1110000100) Road 0 1000 OIL 30 5 Location A. Lagg - Abisko Winter School 16
  • 17. Search space Oil example: search space is one dimensional  (and stupid: how to define a fitness function?). RTE: encoding several values into the  chromosome many dimensions can be searched Search space an be visualised as a surface or  fitness landscape in which fitness dictates height (fitness / chisqr hypersurface) Each possible genotype is a point in the space  A GA tries to move the points to better places  (higher fitness) in the space A. Lagg - Abisko Winter School 17
  • 18. Fitness landscapes (2-D) A. Lagg - Abisko Winter School 18
  • 19. Search space Obviously, the nature of the search space  dictates how a GA will perform A completely random space would be bad for  a GA Also GA‟s can, in practice, get stuck in local  maxima if search spaces contain lots of these Generally, spaces in which small  improvements get closer to the global optimum are good A. Lagg - Abisko Winter School 19
  • 20. The algorithm Generate a set of random solutions  Repeat  Test each solution in the set (rank them)  Remove some bad solutions from set  Duplicate some good solutions  make small changes to some of them  Until best solution is good enough  How to duplicate good solutions? A. Lagg - Abisko Winter School 20
  • 21. Adding Sex Two high scoring “parent” bit strings  sex (chromosomes) are selected and with some probability (crossover rate) combined result of sex Producing two new offsprings (bit strings)  parents are seldom Each offspring may then be changed randomly  happy with the (mutation) result Selecting parents: many schemes possible,  example: Roulette Wheel  Add up the fitness's of all chromosomes  Generate a random number R in that range  Select the first chromosome in the population that - when all previous fitness‟s are added - gives you at least the value R A. Lagg - Abisko Winter School 21
  • 22. Example population No. Chromosome Fitness 1 1010011010 1 2 1111100001 2 3 1011001100 3 4 1010000000 1 5 0000010000 3 6 1001011111 5 7 0101010101 1 8 1011100111 2 sum: 18 A. Lagg - Abisko Winter School 22
  • 23. Roulette Wheel Selection 1 2 3 4 5 6 7 8 1 2 3 1 3 5 1 2 0 Rnd[0..18] = 7 Rnd[0..18] = 12 18 Chromosome4 Chromosome6 Parent1 Parent2 Higher chance of picking a fit chromosome! A. Lagg - Abisko Winter School 23
  • 24. Crossover - Recombination 1011011111 1010000000 Parent1 Offspring1 1010000000 1001011111 Offspring2 Parent2 Crossover single point - With some high probability (crossover random rate) apply crossover to the parents. (typical values are 0.8 to 0.95) A. Lagg - Abisko Winter School 24
  • 25. Mutation mutate 1011001111 1011011111 Offspring1 Offspring1 1000000000 1010000000 Offspring2 Offspring2 Original offspring Mutated offspring With some small probability (the mutation rate) flip each bit in the offspring (typical values between 0.1 and 0.001) A. Lagg - Abisko Winter School 25
  • 26. Improved algorithm  Generate a population of random chromosomes  Repeat (each generation)  Calculate fitness of each chromosome  Repeat  Use roulette selection to select pairs of parents  Generate offspring with crossover and mutation  Until a new population has been produced  Until best solution is good enough A. Lagg - Abisko Winter School 26
  • 27. Many Variants of GA Different kinds of selection (not roulette):  Tournament, Elitism, etc. Different recombination:  one-point crossover, multi-point crossover, 3 way crossover etc. Different kinds of encoding other than bitstring  Integer values, Ordered set of symbols Different kinds of mutation  variable mutation rate Different reduction plans  controls how newly bred offsprings are inserted into the population PIKAIA (Charbonneau, 1995) A. Lagg - Abisko Winter School 27
  • 28. How PIKAIA works… A. Lagg - Abisko Winter School 28
  • 29. List of ME Codes (incomplete) HeLIx+  A. Lagg, most flexible code (multi-comp, multi line), He 10830 Hanle slab model implemented. Genetic algorithm Pikaia. Fully parallel.  VFISV J.M.Borrero, for SDO HMI. Fastest ME code available. F90, fully parallel. Levenberg-Marquardt with some optimizations.  MERLIN Written by Jose Garcia at HAO in C, C++ and some other routines in Fortran. (Lites et al. 2007 in Il Nouvo Cimento)  MELANIE Hector Socas at HAO. In F90, not parallel. Numerical derivatives.  HAZEL Artoro Lopez Ariste et al. (2008). Optimized for He 10830, He D3, Hanle-slab model.  MILOS Orozco Suarez et al. (2007), IDL, some papers published with it A. Lagg - Abisko Winter School 29
  • 30. Installation & Usage of HeLIX+ Follow instructions on user„s manual: Basic usage:  1-component model, create & invert synthetic spectrum  discuss problems:  parameter crosstalk  uniqueness of solution  stability & reliability  influence of noise Download from http://www.mps.mpg.de/homes/lagg GBSO download-section  helix use invert and IR$soft A. Lagg - Abisko Winter School 30
  • 31. Exercise II: HeLIx+ installation and basic usage  install and run IDL interface of Synthesis HeLIx+  add complexity to atmospheric  the first input file: synthesis of model (stray-light, multi- Fe I 6302.5 component)  add 2nd spectral line (Fe  change atmospheric parameters (B, INC, …) 6301.5)  change line parameters (quantum numbers, geff) blind tests:  display Zeeman pattern  take synthetic profile from  add noise someone else and invert it 1st inversion    play with noise level / initial Which parameters are robust?  values / parameter range How can robustness be  weighting scheme improved? Download first input file: abisko_1c.ipt http://www.mps.mpg.de/homes/lagg/ A. Lagg - Abisko Winter School 31