danuker / symreg Goto Github PK
View Code? Open in Web Editor NEWA Symbolic Regression engine
License: MIT License
A Symbolic Regression engine
License: MIT License
Use Python poetry: https://python-poetry.org/
Poetry seems to have 636/1661 (38.3%) of commits as bugfixes.
Deciding instead to use pipenv, which only has 1539/7001 (21.9%)
It is a bit awkward to require SolutionScore
just for passing it to ndim_pareto_ranking
:
Line 56 in dfc3a3f
Use a list of dicts instead, and convert the methods to plain functions.
Use https://www.postman.com/ for easier collaboration
Make tests run automatically (some YAMLs i've heard)
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.
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.
Use len(signature(add).parameters)
.
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.
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.
Start with make_seeded_regressor
; learn it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.