Giter Site home page Giter Site logo

symreg's People

Contributors

danuker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

symreg's Issues

Multiprocessing is slow

Multiprocessing is very slow, compared to evolving one generation.

One 50-individual generation evolves in around 10ms, whereas starting a new process is 100-200 ms.

Still, in benchmarks, small generations with frequent feedback are what work best.

There is no obvious way to parallelize, because the GIL would block the CPU-intensive threads.

Think about what can be done.

Add multiplicative mutation

In _new_leaf there is logic to add a Gaussian for optimizing constants.

Also add a multiplicative mutation choice (multiply the constant by a Gaussian).

This is useful while we don't have faster optimization routines implemented.

Update to Python 3.10

Currently, there is an error on Py3.10:

_______________________________________________________________________________________________________________ ERROR collecting tests/test_regressor.py ________________________________________________________________________________________________________________
ImportError while importing test module '/home/dan/projects/symreg/tests/test_regressor.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_regressor.py:6: in <module>
    import symreg.ga
symreg/__init__.py:1: in <module>
    from .regressor import Regressor
symreg/regressor.py:4: in <module>
    from symreg.ga import GA
symreg/ga.py:6: in <module>
    from .nsgaii import nsgaii_cull
symreg/nsgaii.py:4: in <module>
    from orderedset import OrderedSet
../../.local/lib/python3.10/site-packages/orderedset/__init__.py:5: in <module>
    from ._orderedset import OrderedSet
E   ImportError: /home/dan/.local/lib/python3.10/site-packages/orderedset/_orderedset.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send

Remove orderedset as a dependency, and use own implementation.

Support Scikit Learn Pipeline

Since SymReg works best with normalized data, it would be ideal to allow it to be used in a sklearn pipeline, with a StandardScaler(with_mean=False) preprocessor.

Make sure this is possible, and add an example to the README.


Alternatively (if Pipeline support needs sklearn dependency): have an argument to just normalize the data inside. Divide by the median of the data for the regression, then multiply back when returning the resulting functions.

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.