github-actions[bot] commited on
Commit Β·
0067feb
1
Parent(s): cc75fc7
swap README for HF
Browse files
README.md
CHANGED
|
@@ -1,71 +1,9 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
- **`scattering.py`** β Inverse scattering transform: constructs exact N-soliton solutions from scattering data via the Marchenko matrix and Ο-function formulations. Also solves the SchrΓΆdinger eigenvalue problem to extract spectral data from arbitrary potentials.
|
| 11 |
-
- **`physics.py`** β KdV operator and conservation hierarchy. Computes the PDE residual and conserved densities/fluxes (mass, momentum, energy, and higher) via autograd.
|
| 12 |
-
- **`train.py`** β Two-phase training: supervised pretraining against the analytic solution to select the correct topological sector, followed by physics-informed fine-tuning using the KdV residual.
|
| 13 |
-
- **`validation.py`** β End-to-end validation pipeline: trains, evaluates conservation law residuals, and runs inverse scattering to verify isospectra lity.
|
| 14 |
-
- **`parameter_sweep.py`** β Sweeps over soliton number, ΞΊ values, and initial positions.
|
| 15 |
-
|
| 16 |
-
The [interactive demo](https://huggingface.co/spaces/angerami/kdv-pinn) computes analytic N-soliton solutions on the fly and displays the potential, eigenfunctions, and recovered eigenvalues. See the [writeup](https://angerami.github.io/posts/2026/kdv-pinn/) for background and results.
|
| 17 |
-
|
| 18 |
-
## Project Structure
|
| 19 |
-
```
|
| 20 |
-
kdv-pinn/
|
| 21 |
-
βββ .github
|
| 22 |
-
β βββ workflows
|
| 23 |
-
β βββ sync_to_hf.yml
|
| 24 |
-
βββ .gitignore
|
| 25 |
-
βββ apps
|
| 26 |
-
β βββ streamlit_app.py
|
| 27 |
-
βββ configuration.py
|
| 28 |
-
βββ Dockerfile
|
| 29 |
-
βββ equations.md
|
| 30 |
-
βββ HF_README.md
|
| 31 |
-
βββ models.py
|
| 32 |
-
βββ notebooks
|
| 33 |
-
β βββ analytic_solutions.ipynb
|
| 34 |
-
β βββ example_kdv_slices.ipynb
|
| 35 |
-
β βββ kdv_pinn.ipynb
|
| 36 |
-
βββ parameter_sweep.py
|
| 37 |
-
βββ physics.py
|
| 38 |
-
βββ plot_utils.py
|
| 39 |
-
βββ README.md
|
| 40 |
-
βββ requirements.txt
|
| 41 |
-
βββ run_training.py
|
| 42 |
-
βββ sampling.py
|
| 43 |
-
βββ scattering.py
|
| 44 |
-
βββ train.py
|
| 45 |
-
βββ validation.py
|
| 46 |
-
```
|
| 47 |
-
|
| 48 |
-
## Quick Start
|
| 49 |
-
|
| 50 |
-
### Training
|
| 51 |
-
```bash
|
| 52 |
-
# Train with default configuration
|
| 53 |
-
python train.py
|
| 54 |
-
|
| 55 |
-
# Train with custom epochs
|
| 56 |
-
python train.py --epochs 5000
|
| 57 |
-
|
| 58 |
-
# Run full validation
|
| 59 |
-
python validation.py
|
| 60 |
-
```
|
| 61 |
-
|
| 62 |
-
### Interactive Application
|
| 63 |
-
```bash
|
| 64 |
-
# Launch Streamlit app for exploring N-soliton solutions
|
| 65 |
-
streamlit run apps/streamlit_app.py
|
| 66 |
-
```
|
| 67 |
-
|
| 68 |
-
### Notebooks
|
| 69 |
-
```bash
|
| 70 |
-
jupyter notebook notebooks/kdv_pinn.ipynb
|
| 71 |
-
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: KdV PINN
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|