PhySO  by WassimTenachi

Symbolic optimization package for physics

Created 2 years ago
1,909 stars

Top 22.9% on SourcePulse

GitHubView on GitHub
Project Summary

$\Phi$-SO is a symbolic regression package designed for physics applications, enabling the discovery of analytical physical laws from data. It targets researchers and engineers seeking to automate scientific discovery by inferring equations, leveraging physical constraints to enhance efficiency and accuracy.

How It Works

$\Phi$-SO employs deep reinforcement learning to search the space of functional forms for symbolic regression. Its key innovations include the use of physical unit constraints via dimensional analysis to prune the search space and class constraints to fit multiple datasets with a single analytical form. This approach aims to discover accurate physical laws even with noisy data.

Quick Start & Requirements

  • Installation: Clone the repository (git clone https://github.com/WassimTenachi/PhySO.git), create a conda environment (conda create -n PhySO python=3.8), activate it (conda activate PhySO), install dependencies (conda install --file requirements.txt), and install the package (python -m pip install -e .).
  • Prerequisites: Python 3.8, Conda, NumPy, Matplotlib, PyTorch. CUDA is supported but not recommended for performance.
  • Testing: Import test (python3 -c "import physo"), unit tests (python -m unittest discover -p "*UnitTest.py").
  • Documentation: physo.readthedocs.io
  • SR Quick Start: sr_quick_start.ipynb

Highlighted Details

  • Achieves state-of-the-art performance on the Feynman benchmark, particularly with noisy data (>0.1%).
  • Supports physical unit constraints (dimensional analysis) and class constraints for fitting multiple datasets.
  • Can recover equations from synthetic data, with examples provided for damped harmonic oscillators.
  • Offers multiple configuration presets for varying speed and effectiveness, with recommendations for scientific use.

Maintenance & Community

The project is actively developed by Wassim Tenachi. Further community engagement details are not explicitly provided in the README.

Licensing & Compatibility

The repository does not explicitly state a license. The provided citation information suggests academic use. Compatibility for commercial or closed-source linking is not specified.

Limitations & Caveats

The README notes that $\Phi$-SO's performance is heavily dependent on hyperparameter tuning. While CUDA is supported, it may not improve performance and can even hinder it due to the bottleneck in free constant optimization. The project is primarily demonstrated with Python 3.8.

Health Check
Last Commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
13 stars in the last 30 days

Explore Similar Projects

Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Li Jiang Li Jiang(Coauthor of AutoGen; Engineer at Microsoft), and
6 more.

numpy-ml by ddbourgin

0.1%
16k
ML algorithms implemented in NumPy
Created 6 years ago
Updated 1 year ago
Feedback? Help us improve.