Introducing PhySO: Physical Symbolic Optimization
Physical Symbolic Optimization (Φ-SO) is a sophisticated symbolic optimization package meticulously built for addressing physics-related problems. With Φ-SO, researchers and scientists can delve into the fascinating realm of symbolic regression, leveraging advanced computational techniques to discover analytical physical laws that fit a given set of data points.
Overview
At its core, the symbolic regression module of Φ-SO employs cutting-edge deep reinforcement learning methods. This enables the system to infer and propose physical laws by efficiently searching functional forms that best suit the provided data.
Key Features
-
Dimensional Analysis: One of the standout features of Φ-SO is its ability to incorporate physical units constraints through dimensional analysis, which significantly streamlines the search space. By doing so, it focuses the search on function forms that comply with known physical dimensions, leading to more precise and relevant results. This has been detailed in research such as (Tenachi et al 2023).
-
Class Constraints: Another innovative aspect is its class constraints capability, where Φ-SO searches for analytical functional forms that can accurately fit multiple datasets. Each dataset might be governed by a unique set of parameters, making this feature particularly valuable for comprehensive physics problems (as discussed in Tenachi et al 2024).
Achievements
Φ-SO's prowess is exemplified in its successful recovery of complex equations, such as for a damped harmonic oscillator, and its impressive performance on the Feynman benchmark from SRBench. This benchmark includes 120 expressions from the renowned Feynman Lectures on Physics, against which Φ-SO demonstrates state-of-the-art accuracy, even in noisy conditions.
Installation and Setup
The installation process for Φ-SO is user-friendly, accommodating various operating systems including Linux, OSX, and Windows. By utilizing a conda virtual environment, users can conveniently set up the package, ensuring that all dependencies are appropriately installed.
Here's a step-by-step guide:
-
Set Up a Conda Environment:
conda create -n PhySO python=3.8 conda activate PhySO
-
Download and Install:
- Clone the repository using git:
Or download the zip file.git clone https://github.com/WassimTenachi/PhySO
- Install necessary dependencies:
conda install --file requirements.txt
- Finish the installation:
python -m pip install -e .
- Clone the repository using git:
Getting Started: A Step-by-Step Guide to Symbolic Regression (SR)
To begin using Φ-SO for symbolic regression, users should:
-
Set Up the Environment: Ensure all necessary libraries like numpy, matplotlib, and torch are imported.
-
Create Synthetic Datasets: Develop toy datasets to simulate real data, enabling Φ-SO to identify underlying patterns and relationships.
-
Configure SR: Employ hyperparameters to tailor Φ-SO's symbolic regression capabilities to specific problems, improving the accuracy and relevance of results.
-
Run SR: Execute symbolic regression tasks, allowing Φ-SO to explore various functional forms to model the relationship between dataset variables.
-
Inspect Results: After the regression task, Φ-SO provides expressions in formats like sympy or LaTeX, making it easy for users to interpret and apply the results.
Conclusion
The Φ-SO project is a powerful ally for researchers seeking to unlock the secrets embedded within their data using the principles of physics. Its integration of machine learning with domain-specific knowledge, such as dimensional analysis, makes it a pioneering tool in the field of symbolic regression. For further details, users are encouraged to explore the comprehensive documentation available at physo.readthedocs.io.
Citing Φ-SO
For those utilizing this tool in academic and professional research, citations to relevant scholarly articles and papers are provided, ensuring proper acknowledgment of the innovations and developments encapsulating Φ-SO's capabilities.