PhySO  by WassimTenachi

Symbolic optimization package for physics

created 2 years ago
1,893 stars

Top 23.5% 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 day ago

Responsiveness

1 day

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

Explore Similar Projects

Starred by Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake).

applied-ai by pytorch-labs

0.3%
289
Applied AI experiments and examples for PyTorch
created 2 years ago
updated 2 months ago
Feedback? Help us improve.