MoadeeB - first (pre-)release

Fuente: Zenodo
Enregistré dans:
Détails bibliographiques
Auteur principal: Gec, Boštjan
Format: Recurso digital
Publié: Zenodo 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866901608028176384
author Gec, Boštjan
author_facet Gec, Boštjan
contents <p>This is the first release of <strong>MoadeeB</strong>, corresponding to the submitted paper. It was first published on 15.2.2025 as a GitHub release:<br><a href="https://github.com/B0Gec/Diofantos/releases/tag/v2.0.0_m2025_2_15">https://github.com/B0Gec/Diofantos/releases/tag/v2.0.0_m2025_2_15</a> <br>and corresponds to the <a href="https://github.com/B0Gec/Diofantos/tree/MoadeeB">MoadeeB</a> branch of the corresponding repository.</p> <h1>MoadeeB</h1> <p><strong>MoadeeB</strong> - <strong>MÖ</strong>eller-<strong>B</strong>uchberger <strong>A</strong>lgorithm based <strong>D</strong>iscovery of <strong>E</strong>xact <strong>E</strong>quations </p> <p><em>"Taming Archimedes' Sand Reckoner to Unearth Exact Equations by Harvesting the Ideal of Points with well-known Commutative Algebra Tools."</em></p> <p>MoadeeB is an algorithm implemented in Python for the discovery of exact equations (e.g. from integer sequences).</p> <h2>How to set up MoadeeB</h2> <p>To reproduce results, one could use container (instructions below) as an alternative to installing Python dependencies listed in the next sections below.</p> <p>Otherwise, go ahead and install the dependencies in a new python environment.</p> <p>Nonetheless, you will also need the CoCoA software as described in <em>Other prerequisites</em> below.</p> <p>In case of import errors, refer to the GitHub repository and download the needed files. You can do this effectively by git commands following the next section.</p> <h2>Get essential files via git</h2> <p>In case of need for specific additional files, I find it easiest to use git to make an efficient clone to automatically download the essential files to try out the method. Run these commands in terminal: </p> <blockquote> <p>git clone --single-branch --branch MoadeeB -n --depth=1 --filter=tree:0 https://github.com/B0Gec/Diofantos<br>cd Diofantos<br>git restore --source HEAD exact_ed.py diophantine_solver.py doones.py cores_test.csv sindy_oeis.py gather_results.py mb_oeis.py mb_wrap.py cocoa_location.py real-bench real_world_bench.py real_world_bench_evaluate.py</p> </blockquote> <p>In the end download <code>linear_database_newbl.csv</code> manually (182.8MB) from my Zenodo repository (<a href="https://doi.org/10.5281/zenodo.13767012">https://doi.org/10.5281/zenodo.13767012</a>), since it is stored as git lfs (large files) and they seem to be hard to download as a single file.</p> <h2>Simple example of MoadeeB' execution in terminal:</h2> <blockquote> <p>python doones.py --task_id 14 --exper_id output_dir</p> </blockquote> <p>will produce the output file `results/output_dir/00014_A000045.txt` with similar content:</p> <blockquote> <p>orders_used: [2]<br>Exact ED for 15-th sequence of 164 in experiment set with id A000045 for first 200 terms with max order 20 while double checking against first 199 terms. took:<br> 1.1 seconds, i.e. 0.02 minutes or 0.0 hours.<br>CORELIST: True, METHOD: MB, SINDy: False (True also in case of MAVI), GROUND_TRUTH: False, SINDy_default: True, DEBUG: False, OEISformer: False<br>n_of_terms_ed: 200, N_OF_TERMS_ED: 200<br>Library: n, max_order 20, max_degree: 3, threshold: 0.1, <br>n_more_terms: 10<br>Library: n, max_order 20, threshold: 0.1<br>  MB:  n_more_terms: 10 MAX_BITSIZE: 50</p> <p>by degree: unknown_mb and order: 2.<br>eqs_explicit:<br>['a(n) = a(n-2) + a(n-1)']<br>non_linears:<br>['a(n) -a(n-1) -a(n-2)']<br>A000045: <br>a(n) = a(n-2) + a(n-1)<br>truth: <br>None</p> <p>No ground truth :(  -  checked against website ground truth.     <br>True  -  "manual" check if equation is correct. </p> </blockquote> <p>This (Fibonacci) example was tested on 26.2.2024 and 18.2.2025.</p> <h2>Apptainer/Singularity container:</h2> <p>- Results from paper can be reproduced by running the doones.py file from python from the Singularity container obtained <br>  from the Singularity Hub in the following way:<br>- `apptainer remote add --no-login SylabsCloud cloud.sycloud.io`<br>- `singularity remote use SylabsCloud`<br>- `singularity pull library://bogec/diofantos/oeis:latest`<br>- run e.g.: `~/ProGED_oeis$ singularity exec oeis_latest.sif python3 doones.py --task_id 13 --exper_id reproduced_experiment`</p> <h2>Experiments</h2> <p>- database of _linrec_ sequences: `linear_database_newbl.csv`<br>- database of _core_ sequences: `cores_test.csv`<br>- nine data sets of real-world benchmarks (in directory `real-bench`): `pitagora-triplets.csv`, `det.csv`, `tr.csv`, <br>     `wheel.csv`, `euler.csv`, `riemann-roch.csv`, `symcomp.csv`, `symcomp6ratio_y2-x2diof.csv`, `symcomp10ratio_-3x2p3y2p3y.csv` <br>  - were generated and evaluated by: `real_world_bench.py`, `real_world_bench_evaluate.py`<br>- script for running MoadeeB, Diofantos and SINDy-based approaches: `doones.py`<br>- [Diofantos](https://doi.org/10.3390/math12233745) code: `exact_ed.py`<br>- MoadeeB code: `mb_oeis.py`, `mb_wrap.py`<br>- SINDy based approaches: `sindy_oeis.py`<br>- Results: directories `results` (also some in `results_oeis`)<br>  - results/goodmb  (MoadeeB only):<br>    - `mblinbs50`   linrec<br>    - `mbcor`      core<br>    - `rewritten-mbtmord20r`  TM-OEIS n_input=15 (n_pred=1 and 10)<br>    - `re2-mbtmN25`     TM-OEIS n_input=25 (n_pred=1 and 10)<br>  - results/good  (Diofantos and sindy only):<br>    - `dilin`      Diofantos linrec<br>    - `dicorrep`   Diofantos core<br>    - `silin`      SINDy-tuned linrec<br>    - `sicor1114`  SINDy-tuned core<br>    - `sdlin`      SINDy-default linrec<br>    - `sdcor2`     SINDy-default core<br>    - `re2-transfoeis_acc2` Diofantos TM-OEIS n_input=25 (and n_pred=1 and 10)<br>    - `re3-n15_acc`         Diofantos TM-OEIS n_input=15 (and n_pred=1 and 10)</p> <h2>Features</h2> <p>- algebraic equations with variables `n`, `a(n-k)` for all *k* up to chosen order and<br>their combinations up to degree *d*.</p> <h2>Dependencies</h2> <p>- [Diophantine](https://pypi.org/project/Diophantine/)<br>- numpy<br>- scipy<br>- sympy<br>- pytest (optional)</p> <h2>Other prerequisites</h2> <p>We need the CoCoA software <a href="https://apcocoa.uni-passau.de">apcocoa</a> containing Moeller-Buchberger algorithm (function IdealOfPoints).</p> <p>After downloading, write the location of directory `apcocoa2_unix` into variable `cocoa_location`<br>inside of the `cocoa_location_secret.py` file, e.g. `cocoa_location_secret = '~/Documents/CoCoA/'`.</p> <h2>Related repositories:</h2> <ul> <li><a href="https://doi.org/10.5281/zenodo.13692310" target="_blank" rel="noopener">https://doi.org/10.5281/zenodo.13692310</a></li> <li><a href="https://doi.org/10.5281/zenodo.13767012" target="_blank" rel="noopener">https://doi.org/10.5281/zenodo.13767012</a></li> </ul>
format Recurso digital
id zenodo_https___doi_org_10_5281_zenodo_18391903
institution Zenodo
language
publishDate 2025
publisher Zenodo
record_format zenodo
spellingShingle MoadeeB - first (pre-)release
Gec, Boštjan
Machine Learning
symbolic regression
equation discovery
Gröbner basis
Buchberger-Möller algorithm
Online encyclopedia of integer sequences, OEIS
<p>This is the first release of <strong>MoadeeB</strong>, corresponding to the submitted paper. It was first published on 15.2.2025 as a GitHub release:<br><a href="https://github.com/B0Gec/Diofantos/releases/tag/v2.0.0_m2025_2_15">https://github.com/B0Gec/Diofantos/releases/tag/v2.0.0_m2025_2_15</a> <br>and corresponds to the <a href="https://github.com/B0Gec/Diofantos/tree/MoadeeB">MoadeeB</a> branch of the corresponding repository.</p> <h1>MoadeeB</h1> <p><strong>MoadeeB</strong> - <strong>MÖ</strong>eller-<strong>B</strong>uchberger <strong>A</strong>lgorithm based <strong>D</strong>iscovery of <strong>E</strong>xact <strong>E</strong>quations </p> <p><em>"Taming Archimedes' Sand Reckoner to Unearth Exact Equations by Harvesting the Ideal of Points with well-known Commutative Algebra Tools."</em></p> <p>MoadeeB is an algorithm implemented in Python for the discovery of exact equations (e.g. from integer sequences).</p> <h2>How to set up MoadeeB</h2> <p>To reproduce results, one could use container (instructions below) as an alternative to installing Python dependencies listed in the next sections below.</p> <p>Otherwise, go ahead and install the dependencies in a new python environment.</p> <p>Nonetheless, you will also need the CoCoA software as described in <em>Other prerequisites</em> below.</p> <p>In case of import errors, refer to the GitHub repository and download the needed files. You can do this effectively by git commands following the next section.</p> <h2>Get essential files via git</h2> <p>In case of need for specific additional files, I find it easiest to use git to make an efficient clone to automatically download the essential files to try out the method. Run these commands in terminal: </p> <blockquote> <p>git clone --single-branch --branch MoadeeB -n --depth=1 --filter=tree:0 https://github.com/B0Gec/Diofantos<br>cd Diofantos<br>git restore --source HEAD exact_ed.py diophantine_solver.py doones.py cores_test.csv sindy_oeis.py gather_results.py mb_oeis.py mb_wrap.py cocoa_location.py real-bench real_world_bench.py real_world_bench_evaluate.py</p> </blockquote> <p>In the end download <code>linear_database_newbl.csv</code> manually (182.8MB) from my Zenodo repository (<a href="https://doi.org/10.5281/zenodo.13767012">https://doi.org/10.5281/zenodo.13767012</a>), since it is stored as git lfs (large files) and they seem to be hard to download as a single file.</p> <h2>Simple example of MoadeeB' execution in terminal:</h2> <blockquote> <p>python doones.py --task_id 14 --exper_id output_dir</p> </blockquote> <p>will produce the output file `results/output_dir/00014_A000045.txt` with similar content:</p> <blockquote> <p>orders_used: [2]<br>Exact ED for 15-th sequence of 164 in experiment set with id A000045 for first 200 terms with max order 20 while double checking against first 199 terms. took:<br> 1.1 seconds, i.e. 0.02 minutes or 0.0 hours.<br>CORELIST: True, METHOD: MB, SINDy: False (True also in case of MAVI), GROUND_TRUTH: False, SINDy_default: True, DEBUG: False, OEISformer: False<br>n_of_terms_ed: 200, N_OF_TERMS_ED: 200<br>Library: n, max_order 20, max_degree: 3, threshold: 0.1, <br>n_more_terms: 10<br>Library: n, max_order 20, threshold: 0.1<br>  MB:  n_more_terms: 10 MAX_BITSIZE: 50</p> <p>by degree: unknown_mb and order: 2.<br>eqs_explicit:<br>['a(n) = a(n-2) + a(n-1)']<br>non_linears:<br>['a(n) -a(n-1) -a(n-2)']<br>A000045: <br>a(n) = a(n-2) + a(n-1)<br>truth: <br>None</p> <p>No ground truth :(  -  checked against website ground truth.     <br>True  -  "manual" check if equation is correct. </p> </blockquote> <p>This (Fibonacci) example was tested on 26.2.2024 and 18.2.2025.</p> <h2>Apptainer/Singularity container:</h2> <p>- Results from paper can be reproduced by running the doones.py file from python from the Singularity container obtained <br>  from the Singularity Hub in the following way:<br>- `apptainer remote add --no-login SylabsCloud cloud.sycloud.io`<br>- `singularity remote use SylabsCloud`<br>- `singularity pull library://bogec/diofantos/oeis:latest`<br>- run e.g.: `~/ProGED_oeis$ singularity exec oeis_latest.sif python3 doones.py --task_id 13 --exper_id reproduced_experiment`</p> <h2>Experiments</h2> <p>- database of _linrec_ sequences: `linear_database_newbl.csv`<br>- database of _core_ sequences: `cores_test.csv`<br>- nine data sets of real-world benchmarks (in directory `real-bench`): `pitagora-triplets.csv`, `det.csv`, `tr.csv`, <br>     `wheel.csv`, `euler.csv`, `riemann-roch.csv`, `symcomp.csv`, `symcomp6ratio_y2-x2diof.csv`, `symcomp10ratio_-3x2p3y2p3y.csv` <br>  - were generated and evaluated by: `real_world_bench.py`, `real_world_bench_evaluate.py`<br>- script for running MoadeeB, Diofantos and SINDy-based approaches: `doones.py`<br>- [Diofantos](https://doi.org/10.3390/math12233745) code: `exact_ed.py`<br>- MoadeeB code: `mb_oeis.py`, `mb_wrap.py`<br>- SINDy based approaches: `sindy_oeis.py`<br>- Results: directories `results` (also some in `results_oeis`)<br>  - results/goodmb  (MoadeeB only):<br>    - `mblinbs50`   linrec<br>    - `mbcor`      core<br>    - `rewritten-mbtmord20r`  TM-OEIS n_input=15 (n_pred=1 and 10)<br>    - `re2-mbtmN25`     TM-OEIS n_input=25 (n_pred=1 and 10)<br>  - results/good  (Diofantos and sindy only):<br>    - `dilin`      Diofantos linrec<br>    - `dicorrep`   Diofantos core<br>    - `silin`      SINDy-tuned linrec<br>    - `sicor1114`  SINDy-tuned core<br>    - `sdlin`      SINDy-default linrec<br>    - `sdcor2`     SINDy-default core<br>    - `re2-transfoeis_acc2` Diofantos TM-OEIS n_input=25 (and n_pred=1 and 10)<br>    - `re3-n15_acc`         Diofantos TM-OEIS n_input=15 (and n_pred=1 and 10)</p> <h2>Features</h2> <p>- algebraic equations with variables `n`, `a(n-k)` for all *k* up to chosen order and<br>their combinations up to degree *d*.</p> <h2>Dependencies</h2> <p>- [Diophantine](https://pypi.org/project/Diophantine/)<br>- numpy<br>- scipy<br>- sympy<br>- pytest (optional)</p> <h2>Other prerequisites</h2> <p>We need the CoCoA software <a href="https://apcocoa.uni-passau.de">apcocoa</a> containing Moeller-Buchberger algorithm (function IdealOfPoints).</p> <p>After downloading, write the location of directory `apcocoa2_unix` into variable `cocoa_location`<br>inside of the `cocoa_location_secret.py` file, e.g. `cocoa_location_secret = '~/Documents/CoCoA/'`.</p> <h2>Related repositories:</h2> <ul> <li><a href="https://doi.org/10.5281/zenodo.13692310" target="_blank" rel="noopener">https://doi.org/10.5281/zenodo.13692310</a></li> <li><a href="https://doi.org/10.5281/zenodo.13767012" target="_blank" rel="noopener">https://doi.org/10.5281/zenodo.13767012</a></li> </ul>
title MoadeeB - first (pre-)release
topic Machine Learning
symbolic regression
equation discovery
Gröbner basis
Buchberger-Möller algorithm
Online encyclopedia of integer sequences, OEIS
url https://doi.org/10.5281/zenodo.18391903