FastLSQ 0.2.5__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. {fastlsq-0.2.5 → fastlsq-0.3.0}/CHANGELOG.md +39 -0
  2. {fastlsq-0.2.5 → fastlsq-0.3.0}/FastLSQ.egg-info/PKG-INFO +1 -1
  3. {fastlsq-0.2.5 → fastlsq-0.3.0}/FastLSQ.egg-info/SOURCES.txt +36 -0
  4. {fastlsq-0.2.5 → fastlsq-0.3.0}/PKG-INFO +1 -1
  5. fastlsq-0.3.0/examples/digital_twins/darcy_heat.py +583 -0
  6. fastlsq-0.3.0/examples/digital_twins/pendulum.py +242 -0
  7. fastlsq-0.3.0/examples/digital_twins/pendulum_benchmark.py +281 -0
  8. fastlsq-0.3.0/examples/digital_twins/plasma_wakefield.py +339 -0
  9. fastlsq-0.3.0/examples/digital_twins/plasma_wakefield_2D_1.py +863 -0
  10. fastlsq-0.3.0/examples/digital_twins/plasma_wakefield_2D_2.py +769 -0
  11. fastlsq-0.3.0/examples/digital_twins/plasma_wakefield_2d_3.py +818 -0
  12. fastlsq-0.3.0/examples/digital_twins/plasma_wakefield_parameteric.py +475 -0
  13. fastlsq-0.3.0/examples/digital_twins/plot_utils.py +42 -0
  14. fastlsq-0.3.0/examples/digital_twins/structural_health_simple.py +343 -0
  15. fastlsq-0.3.0/examples/digital_twins/turbulence_gravity_cooling.py +387 -0
  16. fastlsq-0.3.0/examples/integro_differential_demo.py +112 -0
  17. fastlsq-0.3.0/examples/inverse/aero_.py +362 -0
  18. fastlsq-0.3.0/examples/inverse/denoising_parameter_estimation.py +297 -0
  19. fastlsq-0.3.0/examples/inverse/elastic_wave_animation.py +300 -0
  20. fastlsq-0.3.0/examples/inverse/heat_from_video.py +394 -0
  21. fastlsq-0.3.0/examples/inverse/inverse_memory_kernel.py +151 -0
  22. fastlsq-0.3.0/examples/inverse/inverse_turbulence.py +811 -0
  23. fastlsq-0.3.0/examples/inverse/shape_ns.py +1426 -0
  24. fastlsq-0.3.0/examples/inverse/subsurface_imaging.py +547 -0
  25. fastlsq-0.3.0/examples/inverse/wing_optimize_simple.py +283 -0
  26. fastlsq-0.3.0/examples/sindy/compare_sindy_methods.py +760 -0
  27. fastlsq-0.3.0/examples/sindy/sindy_benchmarks.py +351 -0
  28. fastlsq-0.3.0/examples/sindy/sindy_differentiable.py +418 -0
  29. fastlsq-0.3.0/examples/sindy/sindy_minimal_diff.py +716 -0
  30. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/__init__.py +12 -2
  31. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/basis.py +326 -11
  32. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/linalg.py +7 -2
  33. fastlsq-0.3.0/misc/fastlsq_teaser.png +0 -0
  34. fastlsq-0.3.0/misc/ideal_quadrupole.png +0 -0
  35. fastlsq-0.3.0/misc/inverse_heat_source.gif +0 -0
  36. fastlsq-0.3.0/misc/inverse_heat_source.png +0 -0
  37. fastlsq-0.3.0/misc/inverse_magnetostatics.png +0 -0
  38. fastlsq-0.3.0/misc/inverse_magnetostatics_convergence.png +0 -0
  39. fastlsq-0.3.0/misc/quadrupole_convergence.png +0 -0
  40. fastlsq-0.3.0/misc/quadrupole_optimization.png +0 -0
  41. fastlsq-0.3.0/misc/tutorial_nlpoisson_convergence.png +0 -0
  42. fastlsq-0.3.0/misc/tutorial_nlpoisson_solution.png +0 -0
  43. {fastlsq-0.2.5 → fastlsq-0.3.0}/pyproject.toml +1 -1
  44. fastlsq-0.3.0/tests/test_integral.py +195 -0
  45. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_vector_basis.py +1 -1
  46. {fastlsq-0.2.5 → fastlsq-0.3.0}/FastLSQ.egg-info/dependency_links.txt +0 -0
  47. {fastlsq-0.2.5 → fastlsq-0.3.0}/FastLSQ.egg-info/requires.txt +0 -0
  48. {fastlsq-0.2.5 → fastlsq-0.3.0}/FastLSQ.egg-info/top_level.txt +0 -0
  49. {fastlsq-0.2.5 → fastlsq-0.3.0}/LICENSE +0 -0
  50. {fastlsq-0.2.5 → fastlsq-0.3.0}/MANIFEST.in +0 -0
  51. {fastlsq-0.2.5 → fastlsq-0.3.0}/README.md +0 -0
  52. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/add_your_own_pde.py +0 -0
  53. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/benchmark_comparison.py +0 -0
  54. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/custom_features.py +0 -0
  55. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/fred_sde.py +0 -0
  56. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/fred_sde_fastlsq.py +0 -0
  57. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/gaia_potential.py +0 -0
  58. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/gaia_potential_fastlsq.py +0 -0
  59. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/horizons_ephemeris.py +0 -0
  60. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/numerai_alpha.py +0 -0
  61. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/numerai_alpha_fastlsq.py +0 -0
  62. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/run_all_fastlsq.py +0 -0
  63. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/__init__.py +0 -0
  64. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/_alsu_lattice.py +0 -0
  65. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/_common.py +0 -0
  66. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/run_all.py +0 -0
  67. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_beamloss_ode.py +0 -0
  68. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_betatron_tune.py +0 -0
  69. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_green_fff.py +0 -0
  70. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_hill_ivp.py +0 -0
  71. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_observe_fit_act_simulator.py +0 -0
  72. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_orbit_inverse.py +0 -0
  73. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_passive_loco.py +0 -0
  74. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_perturbed_hill.py +0 -0
  75. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_sofb_observe_fit_act.py +0 -0
  76. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_streaming_archive_growth.py +0 -0
  77. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_synchrotron_ode.py +0 -0
  78. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_tides_3months.py +0 -0
  79. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_topoff_impulse.py +0 -0
  80. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s01_visualize.py +0 -0
  81. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s02_plasma_wakefield.py +0 -0
  82. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s03_synchrobetatron.py +0 -0
  83. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s04_sunspots.py +0 -0
  84. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s05_helioseismology.py +0 -0
  85. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s06_tides.py +0 -0
  86. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s07_iers_earth_rotation.py +0 -0
  87. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s08_mauna_loa_co2.py +0 -0
  88. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s09_enso_qbo.py +0 -0
  89. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s10_pulsar_timing.py +0 -0
  90. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s11_modal_analysis.py +0 -0
  91. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s12_mems_resonator.py +0 -0
  92. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s13_variable_stars_kepler.py +0 -0
  93. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s14_eeg.py +0 -0
  94. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/scenarios/s15_circadian.py +0 -0
  95. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/extras/spectral_expansion.py +0 -0
  96. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/grad_shafranov.py +0 -0
  97. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/grid_inverse.py +0 -0
  98. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/grid_rl_control.py +0 -0
  99. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/grid_swing.py +0 -0
  100. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/gs_inverse.py +0 -0
  101. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/gs_rl_control.py +0 -0
  102. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/inverse_heat_source.py +0 -0
  103. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/inverse_magnetostatics.py +0 -0
  104. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/inverse_source_position.py +0 -0
  105. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/learnable_helmholtz.py +0 -0
  106. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/orbit_hill.py +0 -0
  107. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/orbit_inverse.py +0 -0
  108. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/orbit_rl.py +0 -0
  109. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/pde_discovery.py +0 -0
  110. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/run_all_extensions.py +0 -0
  111. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/run_linear.py +0 -0
  112. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/run_nonlinear.py +0 -0
  113. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/tutorial_basic.py +0 -0
  114. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/tutorial_nonlinear.py +0 -0
  115. {fastlsq-0.2.5 → fastlsq-0.3.0}/examples/vector_basis_stream_vorticity.py +0 -0
  116. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/api.py +0 -0
  117. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/block.py +0 -0
  118. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/device.py +0 -0
  119. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/diagnostics.py +0 -0
  120. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/export.py +0 -0
  121. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/geometry.py +0 -0
  122. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/learnable.py +0 -0
  123. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/lightning.py +0 -0
  124. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/newton.py +0 -0
  125. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/plotting.py +0 -0
  126. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/problems/__init__.py +0 -0
  127. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/problems/linear.py +0 -0
  128. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/problems/nonlinear.py +0 -0
  129. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/problems/regression.py +0 -0
  130. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/solvers.py +0 -0
  131. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/tuning.py +0 -0
  132. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/utils.py +0 -0
  133. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/vector.py +0 -0
  134. {fastlsq-0.2.5 → fastlsq-0.3.0}/fastlsq/viz.py +0 -0
  135. {fastlsq-0.2.5 → fastlsq-0.3.0}/requirements.txt +0 -0
  136. {fastlsq-0.2.5 → fastlsq-0.3.0}/setup.cfg +0 -0
  137. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_basic.py +0 -0
  138. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_benchmarks_inverse.py +0 -0
  139. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_block.py +0 -0
  140. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_derivatives.py +0 -0
  141. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_device.py +0 -0
  142. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_grad_shafranov.py +0 -0
  143. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_grid_swing.py +0 -0
  144. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_learnable.py +0 -0
  145. {fastlsq-0.2.5 → fastlsq-0.3.0}/tests/test_orbit_hill.py +0 -0
@@ -2,6 +2,45 @@
2
2
 
3
3
  All notable changes to FastLSQ will be documented in this file.
4
4
 
5
+ ## [0.3.0] - 2026-06-21
6
+
7
+ ### Added
8
+
9
+ - **Exact closed-form integral & integro-differential operators.** The cyclic
10
+ derivative identity `D^α sin(W·x+b) = (∏ W^{α_k}) Φ_{|α| mod 4}` runs *backwards* --
11
+ integration is differentiation of *negative* order, `∫ sin(wx+b) dx = −(1/w)cos(wx+b)`.
12
+ `SinusoidalBasis.derivative` now accepts **signed** multi-indices (negative entries =
13
+ indefinite integration), with a DC guard (`dc_eps`) that zeros features whose frequency
14
+ along an integrated axis is ~0 (their primitive is a ramp that leaves the sinusoidal
15
+ family). `DiffOperator.antiderivative(dim, order, d)` exposes this as a factory, so
16
+ `Op.partial(0,1,1) - k*Op.antiderivative(0,1,1)` composes integro-differential operators.
17
+ - **`IntegralOperator`** -- definite and running (Volterra) integrals with limits,
18
+ via the new `SinusoidalBasis.definite_integral`. Evaluated with a numerically stable
19
+ `sinc` identity (no `1/w` division), so the running integral of a near-DC feature is
20
+ exact rather than singular. Factories `IntegralOperator.volterra(...)` /
21
+ `IntegralOperator.definite(...)`.
22
+ - **`IntegroDifferentialOperator`** -- the common roof under which differential and
23
+ integral terms compose (`+`, `−`, scalar/`nn.Parameter` `*`) into one `(M, N)`
24
+ linear-least-squares design matrix; coefficients stay differentiable so learnable
25
+ integral-term coefficients train through the solve. All three exported from `fastlsq`.
26
+ - **Examples** `examples/integro_differential_demo.py` (one-shot forward solve of
27
+ `u'(x) + ∫_0^x u ds = f`, rel-L2 ~3e-11) and
28
+ `examples/inverse/inverse_memory_kernel.py` (recover an unknown memory strength λ from
29
+ noisy data via AdamW through the differentiable solve). New `tests/test_integral.py`
30
+ asserts ∫-then-∂ round-trips to identity, Volterra/definite match quadrature, the DC
31
+ guard stays finite, and gradients flow to learnable coefficients.
32
+
33
+ ## [0.2.6] - 2026-06-09
34
+
35
+ ### Changed
36
+
37
+ - **Faster `_auto_solve` fallback for ill-conditioned systems.** When the
38
+ Cholesky path fails on CPU with no ridge (`mu = 0`), `_auto_solve` now goes
39
+ straight to the rank-deficient-safe SVD solve (LAPACK `gelsd`) instead of
40
+ first attempting Householder QR with the blow-up guard -- on CPU `gelsd` is
41
+ faster than QR, so the detour only added a full extra factorization. The
42
+ QR-then-SVD path is unchanged for ridge solves and non-CPU devices.
43
+
5
44
  ## [0.2.5] - 2026-06-04
6
45
 
7
46
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FastLSQ
3
- Version: 0.2.5
3
+ Version: 0.3.0
4
4
  Summary: One-shot PDE solving via Fourier features with exact analytical derivatives; rank-revealing solvers, learnable anisotropic bandwidth, and CPU/CUDA/MPS support
5
5
  Author: Antonin Sulc
6
6
  License-Expression: MIT
@@ -18,6 +18,7 @@ examples/grid_rl_control.py
18
18
  examples/grid_swing.py
19
19
  examples/gs_inverse.py
20
20
  examples/gs_rl_control.py
21
+ examples/integro_differential_demo.py
21
22
  examples/inverse_heat_source.py
22
23
  examples/inverse_magnetostatics.py
23
24
  examples/inverse_source_position.py
@@ -32,6 +33,17 @@ examples/run_nonlinear.py
32
33
  examples/tutorial_basic.py
33
34
  examples/tutorial_nonlinear.py
34
35
  examples/vector_basis_stream_vorticity.py
36
+ examples/digital_twins/darcy_heat.py
37
+ examples/digital_twins/pendulum.py
38
+ examples/digital_twins/pendulum_benchmark.py
39
+ examples/digital_twins/plasma_wakefield.py
40
+ examples/digital_twins/plasma_wakefield_2D_1.py
41
+ examples/digital_twins/plasma_wakefield_2D_2.py
42
+ examples/digital_twins/plasma_wakefield_2d_3.py
43
+ examples/digital_twins/plasma_wakefield_parameteric.py
44
+ examples/digital_twins/plot_utils.py
45
+ examples/digital_twins/structural_health_simple.py
46
+ examples/digital_twins/turbulence_gravity_cooling.py
35
47
  examples/extras/fred_sde.py
36
48
  examples/extras/fred_sde_fastlsq.py
37
49
  examples/extras/gaia_potential.py
@@ -73,6 +85,19 @@ examples/extras/scenarios/s12_mems_resonator.py
73
85
  examples/extras/scenarios/s13_variable_stars_kepler.py
74
86
  examples/extras/scenarios/s14_eeg.py
75
87
  examples/extras/scenarios/s15_circadian.py
88
+ examples/inverse/aero_.py
89
+ examples/inverse/denoising_parameter_estimation.py
90
+ examples/inverse/elastic_wave_animation.py
91
+ examples/inverse/heat_from_video.py
92
+ examples/inverse/inverse_memory_kernel.py
93
+ examples/inverse/inverse_turbulence.py
94
+ examples/inverse/shape_ns.py
95
+ examples/inverse/subsurface_imaging.py
96
+ examples/inverse/wing_optimize_simple.py
97
+ examples/sindy/compare_sindy_methods.py
98
+ examples/sindy/sindy_benchmarks.py
99
+ examples/sindy/sindy_differentiable.py
100
+ examples/sindy/sindy_minimal_diff.py
76
101
  fastlsq/__init__.py
77
102
  fastlsq/api.py
78
103
  fastlsq/basis.py
@@ -95,6 +120,16 @@ fastlsq/problems/__init__.py
95
120
  fastlsq/problems/linear.py
96
121
  fastlsq/problems/nonlinear.py
97
122
  fastlsq/problems/regression.py
123
+ misc/fastlsq_teaser.png
124
+ misc/ideal_quadrupole.png
125
+ misc/inverse_heat_source.gif
126
+ misc/inverse_heat_source.png
127
+ misc/inverse_magnetostatics.png
128
+ misc/inverse_magnetostatics_convergence.png
129
+ misc/quadrupole_convergence.png
130
+ misc/quadrupole_optimization.png
131
+ misc/tutorial_nlpoisson_convergence.png
132
+ misc/tutorial_nlpoisson_solution.png
98
133
  tests/test_basic.py
99
134
  tests/test_benchmarks_inverse.py
100
135
  tests/test_block.py
@@ -102,6 +137,7 @@ tests/test_derivatives.py
102
137
  tests/test_device.py
103
138
  tests/test_grad_shafranov.py
104
139
  tests/test_grid_swing.py
140
+ tests/test_integral.py
105
141
  tests/test_learnable.py
106
142
  tests/test_orbit_hill.py
107
143
  tests/test_vector_basis.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FastLSQ
3
- Version: 0.2.5
3
+ Version: 0.3.0
4
4
  Summary: One-shot PDE solving via Fourier features with exact analytical derivatives; rank-revealing solvers, learnable anisotropic bandwidth, and CPU/CUDA/MPS support
5
5
  Author: Antonin Sulc
6
6
  License-Expression: MIT