GithubHelp home page GithubHelp logo

wtaisner / genetic-programming Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8.42 MB

Estimating epistasis in trees for genetic programming problems

Python 16.20% Jupyter Notebook 83.80%
epistasis epistasis-analysis genetic-programming

genetic-programming's Introduction

genetic-programming

Milestone X - 18.05.2023

We implemented calculation of epistasis matrix for a given tree. We compute the change in fitness between each pair of operators, and for each pair of nodes in the tree. Therefore, for example, for operators [+, -, *] and tree consisting of three nodes, where initially we have addition in the first node, subtraction in the second node and addition in the third node, we do the following:

  • compute of pairs of changing the operator for a given node:

    so for our example we will have:

    • for the first node: [(+, -)1, (+, *)1]
    • for the second node: [(-, +)2, (-, *)2]
    • for the third node: [(*, +)3, (*, -)3]
  • compute all combinations of such changes and compute epistasis matrix for the given list of changes:

    in our example we have 8 combinations:

    • [(+, -)1, (-, +)2, (*, +)3]
    • [(+, -)1, (-, +)2, (*, -)3]
    • [(+, -)1, (-, *)2, (*, +)3]
    • [(+, -)1, (-, *)2, (*, -)3]
    • [(+, *)1, (-, +)2, (*, +)3]
    • [(+, *)1, (-, +)2, (*, -)3]
    • [(+, *)1, (-, *)2, (*, +)3]
    • [(+, *)1, (-, *)2, (*, -)3]

    generally, for tree with n nodes and o operators given for the problem, we will have (o-1)n such combinations.

  • after calculating the epistasis matrices for all combinations, we need to aggregate them somehow - so that they will show only nodes dependencies, not caring about the changes of specific operators:

    we implemented 3 ways of aggregating the matrices:

    • "absolute": all values for a given pair of nodes in all generated matrices must be either greater than zero for a given node (then we observe positive epistasis), less than zero (negative epistasis), or zero (no epistasis), for the cases when some values for a given node are positive and some are negative no decision about epistasis effect is made
    • "voting": for each pair of nodes we count the number of matrices in which epistasis was greater than zero, less than zero, equal to zero, the majority class wins
    • "mean": just simply takes the mean over all matrices, this approach displays some value of epistasis for each pair, but at the same time doesn't show the observed disagreements

Example GP tree and heatmaps (obtained matrices) for GCD with absolute loss can be observed below:

Description Picture
GP tree tree
Number of matrices with positive epistasis observed for a given pair of nodes ones
Number of matrices with no epistasis observed for a given pair of nodes no
Number of matrices with negative epistasis observed for a given pair of nodes mones
Aggregated matrix ("absolute") abs
Aggregated matrix ("voting") vote
Aggregated matrix ("mean") mean

The Paper

https://arxiv.org/pdf/2111.07875.pdf

Dataset

(possibly) useful resource:

genetic-programming's People

Contributors

annprzy avatar wtaisner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.