Skip to content

Commit a15d853

Browse files
authored
Merge pull request #74 from 20saaa02/active-matter-feature
An example of EPDE application to a problem, involving active matter.
2 parents 2127824 + 9cdb57a commit a15d853

443 files changed

Lines changed: 590981 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

8 KB
Binary file not shown.

examples/.DS_Store

8 KB
Binary file not shown.

examples/Active_Matter/.DS_Store

10 KB
Binary file not shown.

examples/Active_Matter/README.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Data-Driven Symbolic Equation Discovery of Multi-Robot Dynamics
2+
3+
This repository presents a physics-informed machine learning pipeline for the analysis of multi-robot trajectory data and the discovery of interpretable mathematical models describing their dynamics.
4+
5+
The workflow combines:
6+
* Trajectory preprocessing
7+
* Hyperparameter optimization with **Optuna**
8+
* Symbolic regression via **EPDE**.
9+
10+
## Project Goal
11+
12+
The goal of this work is to develop a hyperparameter optimization with **Optuna** for identifying accurate, compact, and interpretable systems of ordinary differential equations (ODEs) governing the motion of robots based on experimental trajectory data.
13+
14+
---
15+
## Data Description
16+
17+
* **Pickle file** contains raw experimental data extracted from video tracking.
18+
* For each robot and timestep:
19+
* robot ID,
20+
* 2D coordinates `(x, y)`.
21+
* Supported robot shapes:
22+
* circle
23+
* oval
24+
25+
---
26+
## Components
27+
28+
`DataProcessor`
29+
* Extracts coordinates
30+
* Normalizes trajectories (MinMax scaling)
31+
32+
`discovery_science.ipynb`
33+
* Splits trajectories into segments
34+
* Runs EPDE for symbolic regression
35+
* Uses Optuna for hyperparameter tuning
36+
* Outputs differential equations
37+
38+
---
39+
## Hyperparameter optimization
40+
41+
For each trajectory segment of `n_parts` independently:
42+
43+
* **Optuna** optimizes EPDE parameters:
44+
45+
* polynomial window,
46+
* smoothing sigma,
47+
* boundary,
48+
* population size.
49+
50+
* **Optuna** optimizes TEDEOUS parameters:
51+
52+
* the number and frequency of Fourier transform embeddings,
53+
* the number of layers
54+
55+
* Objective balances:
56+
57+
* equation residuals,
58+
* model complexity,
59+
* reconstruction stability.
60+
---
61+
62+
## Repository Structure
63+
64+
```
65+
.
66+
├── discovery_science_mezo.ipynb
67+
├── data_process.py
68+
├── {circle|oval}/
69+
│ ├── data/
70+
│ └── {circle_data_00_330_[30_bots_PWM_10_15cw_15ccw_D_41cm].MP4.pickle | oval_data_[30_bots_PWM_1_exp_1].pickle}
71+
│ ├── levels_robots_ids.json
72+
│ ├── EPDE_output_micro/
73+
│ ├── robot_{id}/
74+
│ └── {n}_parts/
75+
│ └── {with|without}_force/
76+
│ ├── part_{nk}_system_best_params.json
77+
│ ├── part_{nk}_system_history_plot.html
78+
│ ├── part_{nk}_system_importances_plots.html
79+
│ ├── system_{nk}.csv
80+
│ └── part_{nk}_obj_func_and_equations.txt
81+
│ └── EPDE_output_meso
82+
│ ├── robot_{ids}
83+
│ └── ...
84+
└── README.md
85+
```
86+
---
87+
88+
## Dependencies
89+
90+
Core libraries:
91+
* numpy, pandas, scipy
92+
93+
Machine Learning
94+
* scikit-learn
95+
96+
Optimization & Discovery
97+
* epde
98+
* optuna
99+
100+
Utility
101+
* dill (pickle)
102+
* pathlib
103+
* json
104+
105+
---
106+
## Research Outcomes
107+
* Developed a unified pipeline for data-driven discovery of dynamical systems
108+
109+
---
110+
111+
## Limitations and Assumptions
112+
113+
* Robot ID < 100
114+
* Only `oval` and `circle` supported
115+
* derivatives up to second order
116+
* EPDE sensitive to noise and hyperparameters
117+
118+
---
119+
120+
For more information, see the repository https://github.com/20saaa02/Active_Matter
121+
122+
123+
124+
125+
126+
10 KB
Binary file not shown.
12 KB
Binary file not shown.

examples/Active_Matter/circle/EPDE_output_mezo/robot_11_12_17_18_19_27_28_29_30_31_32_34_38_41_42_44_45_50_52_54_62_65_66_72_73_74_77_78_79_83/1_parts/without_force/obj_func_and_equations.txt

Lines changed: 2077 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"best_params": {
3+
"poly_window": 11,
4+
"population_size": 14,
5+
"sigma": 5,
6+
"boundary": 7
7+
},
8+
"score": 155.68504506502222
9+
}

0 commit comments

Comments
 (0)