pyrecest 1.0.3__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 (413) hide show
  1. pyrecest-1.0.3/LICENSE +21 -0
  2. pyrecest-1.0.3/PKG-INFO +85 -0
  3. pyrecest-1.0.3/README.md +59 -0
  4. pyrecest-1.0.3/pyproject.toml +73 -0
  5. pyrecest-1.0.3/pyrecest/__init__.py +1 -0
  6. pyrecest-1.0.3/pyrecest/_backend/.pylintrc +2 -0
  7. pyrecest-1.0.3/pyrecest/_backend/LICENSE_geomstats +9 -0
  8. pyrecest-1.0.3/pyrecest/_backend/README.md +37 -0
  9. pyrecest-1.0.3/pyrecest/_backend/__init__.py +368 -0
  10. pyrecest-1.0.3/pyrecest/_backend/_backend_config.py +11 -0
  11. pyrecest-1.0.3/pyrecest/_backend/_common.py +29 -0
  12. pyrecest-1.0.3/pyrecest/_backend/_dtype_utils.py +420 -0
  13. pyrecest-1.0.3/pyrecest/_backend/_shared_numpy/__init__.py +424 -0
  14. pyrecest-1.0.3/pyrecest/_backend/_shared_numpy/_common.py +119 -0
  15. pyrecest-1.0.3/pyrecest/_backend/_shared_numpy/_dispatch.py +12 -0
  16. pyrecest-1.0.3/pyrecest/_backend/_shared_numpy/linalg.py +138 -0
  17. pyrecest-1.0.3/pyrecest/_backend/_shared_numpy/random.py +29 -0
  18. pyrecest-1.0.3/pyrecest/_backend/autograd/__init__.py +194 -0
  19. pyrecest-1.0.3/pyrecest/_backend/autograd/_common.py +36 -0
  20. pyrecest-1.0.3/pyrecest/_backend/autograd/_dtype.py +0 -0
  21. pyrecest-1.0.3/pyrecest/_backend/autograd/autodiff.py +372 -0
  22. pyrecest-1.0.3/pyrecest/_backend/autograd/linalg.py +62 -0
  23. pyrecest-1.0.3/pyrecest/_backend/autograd/random.py +5 -0
  24. pyrecest-1.0.3/pyrecest/_backend/jax/__init__.py +432 -0
  25. pyrecest-1.0.3/pyrecest/_backend/jax/_dtype.py +29 -0
  26. pyrecest-1.0.3/pyrecest/_backend/jax/autodiff.py +129 -0
  27. pyrecest-1.0.3/pyrecest/_backend/jax/fft.py +8 -0
  28. pyrecest-1.0.3/pyrecest/_backend/jax/linalg.py +34 -0
  29. pyrecest-1.0.3/pyrecest/_backend/jax/random.py +133 -0
  30. pyrecest-1.0.3/pyrecest/_backend/jax/signal.py +1 -0
  31. pyrecest-1.0.3/pyrecest/_backend/jax/spatial.py +1 -0
  32. pyrecest-1.0.3/pyrecest/_backend/numpy/__init__.py +237 -0
  33. pyrecest-1.0.3/pyrecest/_backend/numpy/_common.py +36 -0
  34. pyrecest-1.0.3/pyrecest/_backend/numpy/_dtype.py +0 -0
  35. pyrecest-1.0.3/pyrecest/_backend/numpy/autodiff.py +66 -0
  36. pyrecest-1.0.3/pyrecest/_backend/numpy/fft.py +11 -0
  37. pyrecest-1.0.3/pyrecest/_backend/numpy/linalg.py +33 -0
  38. pyrecest-1.0.3/pyrecest/_backend/numpy/random.py +8 -0
  39. pyrecest-1.0.3/pyrecest/_backend/numpy/signal.py +1 -0
  40. pyrecest-1.0.3/pyrecest/_backend/numpy/spatial.py +1 -0
  41. pyrecest-1.0.3/pyrecest/_backend/pytorch/__init__.py +917 -0
  42. pyrecest-1.0.3/pyrecest/_backend/pytorch/_common.py +35 -0
  43. pyrecest-1.0.3/pyrecest/_backend/pytorch/_dtype.py +148 -0
  44. pyrecest-1.0.3/pyrecest/_backend/pytorch/autodiff.py +458 -0
  45. pyrecest-1.0.3/pyrecest/_backend/pytorch/fft.py +10 -0
  46. pyrecest-1.0.3/pyrecest/_backend/pytorch/linalg.py +161 -0
  47. pyrecest-1.0.3/pyrecest/_backend/pytorch/random.py +59 -0
  48. pyrecest-1.0.3/pyrecest/_backend/pytorch/signal.py +2 -0
  49. pyrecest-1.0.3/pyrecest/_backend/pytorch/spatial.py +27 -0
  50. pyrecest-1.0.3/pyrecest/distributions/__init__.py +417 -0
  51. pyrecest-1.0.3/pyrecest/distributions/abstract_bounded_domain_distribution.py +14 -0
  52. pyrecest-1.0.3/pyrecest/distributions/abstract_bounded_nonperiodic_distribution.py +14 -0
  53. pyrecest-1.0.3/pyrecest/distributions/abstract_custom_distribution.py +77 -0
  54. pyrecest-1.0.3/pyrecest/distributions/abstract_custom_nonperiodic_distribution.py +13 -0
  55. pyrecest-1.0.3/pyrecest/distributions/abstract_dirac_distribution.py +142 -0
  56. pyrecest-1.0.3/pyrecest/distributions/abstract_disk_distribution.py +17 -0
  57. pyrecest-1.0.3/pyrecest/distributions/abstract_distribution_type.py +8 -0
  58. pyrecest-1.0.3/pyrecest/distributions/abstract_ellipsoidal_ball_distribution.py +49 -0
  59. pyrecest-1.0.3/pyrecest/distributions/abstract_grid_distribution.py +112 -0
  60. pyrecest-1.0.3/pyrecest/distributions/abstract_manifold_specific_distribution.py +239 -0
  61. pyrecest-1.0.3/pyrecest/distributions/abstract_mixture.py +105 -0
  62. pyrecest-1.0.3/pyrecest/distributions/abstract_nonperiodic_distribution.py +9 -0
  63. pyrecest-1.0.3/pyrecest/distributions/abstract_orthogonal_basis_distribution.py +70 -0
  64. pyrecest-1.0.3/pyrecest/distributions/abstract_periodic_distribution.py +35 -0
  65. pyrecest-1.0.3/pyrecest/distributions/abstract_periodic_grid_distribution.py +8 -0
  66. pyrecest-1.0.3/pyrecest/distributions/abstract_se2_distribution.py +196 -0
  67. pyrecest-1.0.3/pyrecest/distributions/abstract_se3_distribution.py +127 -0
  68. pyrecest-1.0.3/pyrecest/distributions/abstract_uniform_distribution.py +37 -0
  69. pyrecest-1.0.3/pyrecest/distributions/cart_prod/__init__.py +0 -0
  70. pyrecest-1.0.3/pyrecest/distributions/cart_prod/abstract_cart_prod_distribution.py +10 -0
  71. pyrecest-1.0.3/pyrecest/distributions/cart_prod/abstract_custom_lin_bounded_cart_prod_distribution.py +30 -0
  72. pyrecest-1.0.3/pyrecest/distributions/cart_prod/abstract_hypercylindrical_distribution.py +426 -0
  73. pyrecest-1.0.3/pyrecest/distributions/cart_prod/abstract_lin_bounded_cart_prod_distribution.py +59 -0
  74. pyrecest-1.0.3/pyrecest/distributions/cart_prod/abstract_lin_hemisphere_cart_prod_distribution.py +9 -0
  75. pyrecest-1.0.3/pyrecest/distributions/cart_prod/abstract_lin_hyperhemisphere_cart_prod_distribution.py +13 -0
  76. pyrecest-1.0.3/pyrecest/distributions/cart_prod/abstract_lin_hypersphere_cart_prod_distribution.py +13 -0
  77. pyrecest-1.0.3/pyrecest/distributions/cart_prod/abstract_lin_hypersphere_subset_cart_prod_distribution.py +9 -0
  78. pyrecest-1.0.3/pyrecest/distributions/cart_prod/abstract_lin_periodic_cart_prod_distribution.py +19 -0
  79. pyrecest-1.0.3/pyrecest/distributions/cart_prod/cart_prod_dirac_distribution.py +8 -0
  80. pyrecest-1.0.3/pyrecest/distributions/cart_prod/cart_prod_stacked_distribution.py +58 -0
  81. pyrecest-1.0.3/pyrecest/distributions/cart_prod/custom_hypercylindrical_distribution.py +69 -0
  82. pyrecest-1.0.3/pyrecest/distributions/cart_prod/hypercylindrical_dirac_distribution.py +61 -0
  83. pyrecest-1.0.3/pyrecest/distributions/cart_prod/hypercylindrical_state_space_subdivision_distribution.py +292 -0
  84. pyrecest-1.0.3/pyrecest/distributions/cart_prod/hypercylindrical_state_space_subdivision_gaussian_distribution.py +182 -0
  85. pyrecest-1.0.3/pyrecest/distributions/cart_prod/hyperhemisphere_cart_prod_dirac_distribution.py +38 -0
  86. pyrecest-1.0.3/pyrecest/distributions/cart_prod/lin_bounded_cart_prod_dirac_distribution.py +52 -0
  87. pyrecest-1.0.3/pyrecest/distributions/cart_prod/lin_hypersphere_cart_prod_dirac_distribution.py +22 -0
  88. pyrecest-1.0.3/pyrecest/distributions/cart_prod/lin_hypersphere_subset_dirac_distribution.py +22 -0
  89. pyrecest-1.0.3/pyrecest/distributions/cart_prod/lin_periodic_cart_prod_dirac_distribution.py +7 -0
  90. pyrecest-1.0.3/pyrecest/distributions/cart_prod/mardia_sutton_distribution.py +183 -0
  91. pyrecest-1.0.3/pyrecest/distributions/cart_prod/partially_wrapped_normal_distribution.py +189 -0
  92. pyrecest-1.0.3/pyrecest/distributions/cart_prod/se2_bingham_distribution.py +342 -0
  93. pyrecest-1.0.3/pyrecest/distributions/cart_prod/se2_pwn_distribution.py +134 -0
  94. pyrecest-1.0.3/pyrecest/distributions/cart_prod/state_space_subdivision_distribution.py +75 -0
  95. pyrecest-1.0.3/pyrecest/distributions/cart_prod/state_space_subdivision_gaussian_distribution.py +248 -0
  96. pyrecest-1.0.3/pyrecest/distributions/circle/__init__.py +0 -0
  97. pyrecest-1.0.3/pyrecest/distributions/circle/abstract_circular_distribution.py +72 -0
  98. pyrecest-1.0.3/pyrecest/distributions/circle/circular_dirac_distribution.py +26 -0
  99. pyrecest-1.0.3/pyrecest/distributions/circle/circular_fourier_distribution.py +345 -0
  100. pyrecest-1.0.3/pyrecest/distributions/circle/circular_grid_distribution.py +138 -0
  101. pyrecest-1.0.3/pyrecest/distributions/circle/circular_mixture.py +48 -0
  102. pyrecest-1.0.3/pyrecest/distributions/circle/circular_uniform_distribution.py +47 -0
  103. pyrecest-1.0.3/pyrecest/distributions/circle/custom_circular_distribution.py +55 -0
  104. pyrecest-1.0.3/pyrecest/distributions/circle/generalized_von_mises_distribution.py +77 -0
  105. pyrecest-1.0.3/pyrecest/distributions/circle/piecewise_constant_distribution.py +225 -0
  106. pyrecest-1.0.3/pyrecest/distributions/circle/sine_skewed_distributions.py +246 -0
  107. pyrecest-1.0.3/pyrecest/distributions/circle/von_mises_distribution.py +174 -0
  108. pyrecest-1.0.3/pyrecest/distributions/circle/wrapped_cauchy_distribution.py +28 -0
  109. pyrecest-1.0.3/pyrecest/distributions/circle/wrapped_exponential_distribution.py +43 -0
  110. pyrecest-1.0.3/pyrecest/distributions/circle/wrapped_laplace_distribution.py +38 -0
  111. pyrecest-1.0.3/pyrecest/distributions/circle/wrapped_normal_distribution.py +202 -0
  112. pyrecest-1.0.3/pyrecest/distributions/conditional/__init__.py +11 -0
  113. pyrecest-1.0.3/pyrecest/distributions/conditional/abstract_conditional_distribution.py +161 -0
  114. pyrecest-1.0.3/pyrecest/distributions/conditional/s2_cond_s2_grid_distribution.py +115 -0
  115. pyrecest-1.0.3/pyrecest/distributions/conditional/sd_cond_sd_grid_distribution.py +201 -0
  116. pyrecest-1.0.3/pyrecest/distributions/conditional/sd_half_cond_sd_half_grid_distribution.py +169 -0
  117. pyrecest-1.0.3/pyrecest/distributions/conditional/td_cond_td_grid_distribution.py +202 -0
  118. pyrecest-1.0.3/pyrecest/distributions/custom_hyperrectangular_distribution.py +19 -0
  119. pyrecest-1.0.3/pyrecest/distributions/disk_uniform_distribution.py +23 -0
  120. pyrecest-1.0.3/pyrecest/distributions/ellipsoidal_ball_uniform_distribution.py +89 -0
  121. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/__init__.py +0 -0
  122. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_complex_hyperspherical_distribution.py +58 -0
  123. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_hemispherical_distribution.py +21 -0
  124. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_hyperhemispherical_distribution.py +222 -0
  125. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_hypersphere_subset_dirac_distribution.py +66 -0
  126. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_hypersphere_subset_distribution.py +466 -0
  127. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_hypersphere_subset_grid_distribution.py +137 -0
  128. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_hypersphere_subset_uniform_distribution.py +40 -0
  129. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_hyperspherical_distribution.py +270 -0
  130. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_sphere_subset_distribution.py +149 -0
  131. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_spherical_distribution.py +42 -0
  132. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/abstract_spherical_harmonics_distribution.py +125 -0
  133. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/bingham_distribution.py +308 -0
  134. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/complex_angular_central_gaussian_distribution.py +149 -0
  135. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/complex_bingham_distribution.py +389 -0
  136. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/complex_watson_distribution.py +324 -0
  137. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/custom_hemispherical_distribution.py +45 -0
  138. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/custom_hyperhemispherical_distribution.py +82 -0
  139. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/custom_hyperspherical_distribution.py +22 -0
  140. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hemispherical_uniform_distribution.py +10 -0
  141. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hyperhemispherical_bingham_distribution.py +53 -0
  142. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hyperhemispherical_dirac_distribution.py +16 -0
  143. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hyperhemispherical_grid_distribution.py +250 -0
  144. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hyperhemispherical_uniform_distribution.py +51 -0
  145. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hyperhemispherical_watson_distribution.py +59 -0
  146. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hyperspherical_dirac_distribution.py +44 -0
  147. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hyperspherical_grid_distribution.py +308 -0
  148. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hyperspherical_mixture.py +23 -0
  149. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/hyperspherical_uniform_distribution.py +56 -0
  150. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/spherical_grid_distribution.py +169 -0
  151. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/spherical_harmonics_distribution_complex.py +469 -0
  152. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/spherical_harmonics_distribution_real.py +88 -0
  153. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/von_mises_fisher_distribution.py +203 -0
  154. pyrecest-1.0.3/pyrecest/distributions/hypersphere_subset/watson_distribution.py +126 -0
  155. pyrecest-1.0.3/pyrecest/distributions/hypertorus/__init__.py +0 -0
  156. pyrecest-1.0.3/pyrecest/distributions/hypertorus/abstract_hypertoroidal_distribution.py +314 -0
  157. pyrecest-1.0.3/pyrecest/distributions/hypertorus/abstract_toroidal_bivar_vm_distribution.py +35 -0
  158. pyrecest-1.0.3/pyrecest/distributions/hypertorus/abstract_toroidal_distribution.py +73 -0
  159. pyrecest-1.0.3/pyrecest/distributions/hypertorus/custom_hypertoroidal_distribution.py +52 -0
  160. pyrecest-1.0.3/pyrecest/distributions/hypertorus/custom_toroidal_distribution.py +10 -0
  161. pyrecest-1.0.3/pyrecest/distributions/hypertorus/hypertoroidal_dirac_distribution.py +120 -0
  162. pyrecest-1.0.3/pyrecest/distributions/hypertorus/hypertoroidal_fourier_distribution.py +715 -0
  163. pyrecest-1.0.3/pyrecest/distributions/hypertorus/hypertoroidal_grid_distribution.py +310 -0
  164. pyrecest-1.0.3/pyrecest/distributions/hypertorus/hypertoroidal_mixture.py +80 -0
  165. pyrecest-1.0.3/pyrecest/distributions/hypertorus/hypertoroidal_uniform_distribution.py +104 -0
  166. pyrecest-1.0.3/pyrecest/distributions/hypertorus/hypertoroidal_wrapped_normal_distribution.py +163 -0
  167. pyrecest-1.0.3/pyrecest/distributions/hypertorus/toroidal_dirac_distribution.py +55 -0
  168. pyrecest-1.0.3/pyrecest/distributions/hypertorus/toroidal_fourier_distribution.py +318 -0
  169. pyrecest-1.0.3/pyrecest/distributions/hypertorus/toroidal_mixture.py +18 -0
  170. pyrecest-1.0.3/pyrecest/distributions/hypertorus/toroidal_uniform_distribution.py +14 -0
  171. pyrecest-1.0.3/pyrecest/distributions/hypertorus/toroidal_vm_matrix_distribution.py +328 -0
  172. pyrecest-1.0.3/pyrecest/distributions/hypertorus/toroidal_vm_rivest_distribution.py +146 -0
  173. pyrecest-1.0.3/pyrecest/distributions/hypertorus/toroidal_von_mises_cosine_distribution.py +86 -0
  174. pyrecest-1.0.3/pyrecest/distributions/hypertorus/toroidal_von_mises_sine_distribution.py +32 -0
  175. pyrecest-1.0.3/pyrecest/distributions/hypertorus/toroidal_wrapped_normal_distribution.py +127 -0
  176. pyrecest-1.0.3/pyrecest/distributions/nonperiodic/__init__.py +0 -0
  177. pyrecest-1.0.3/pyrecest/distributions/nonperiodic/abstract_hyperrectangular_distribution.py +43 -0
  178. pyrecest-1.0.3/pyrecest/distributions/nonperiodic/abstract_linear_distribution.py +351 -0
  179. pyrecest-1.0.3/pyrecest/distributions/nonperiodic/custom_linear_distribution.py +76 -0
  180. pyrecest-1.0.3/pyrecest/distributions/nonperiodic/gaussian_distribution.py +134 -0
  181. pyrecest-1.0.3/pyrecest/distributions/nonperiodic/gaussian_mixture.py +57 -0
  182. pyrecest-1.0.3/pyrecest/distributions/nonperiodic/hyperrectangular_uniform_distribution.py +13 -0
  183. pyrecest-1.0.3/pyrecest/distributions/nonperiodic/linear_dirac_distribution.py +82 -0
  184. pyrecest-1.0.3/pyrecest/distributions/nonperiodic/linear_mixture.py +28 -0
  185. pyrecest-1.0.3/pyrecest/distributions/se2_dirac_distribution.py +110 -0
  186. pyrecest-1.0.3/pyrecest/distributions/se3_cart_prod_stacked_distribution.py +22 -0
  187. pyrecest-1.0.3/pyrecest/distributions/se3_dirac_distribution.py +48 -0
  188. pyrecest-1.0.3/pyrecest/evaluation/__init__.py +37 -0
  189. pyrecest-1.0.3/pyrecest/evaluation/check_and_fix_config.py +93 -0
  190. pyrecest-1.0.3/pyrecest/evaluation/configure_for_filter.py +152 -0
  191. pyrecest-1.0.3/pyrecest/evaluation/determine_all_deviations.py +57 -0
  192. pyrecest-1.0.3/pyrecest/evaluation/eot_shape_database.py +221 -0
  193. pyrecest-1.0.3/pyrecest/evaluation/evaluate_for_file.py +71 -0
  194. pyrecest-1.0.3/pyrecest/evaluation/evaluate_for_simulation_config.py +91 -0
  195. pyrecest-1.0.3/pyrecest/evaluation/evaluate_for_variables.py +81 -0
  196. pyrecest-1.0.3/pyrecest/evaluation/generate_groundtruth.py +94 -0
  197. pyrecest-1.0.3/pyrecest/evaluation/generate_measurements.py +194 -0
  198. pyrecest-1.0.3/pyrecest/evaluation/generate_simulated_scenarios.py +40 -0
  199. pyrecest-1.0.3/pyrecest/evaluation/get_axis_label.py +39 -0
  200. pyrecest-1.0.3/pyrecest/evaluation/get_distance_function.py +70 -0
  201. pyrecest-1.0.3/pyrecest/evaluation/get_extract_mean.py +51 -0
  202. pyrecest-1.0.3/pyrecest/evaluation/group_results_by_filter.py +23 -0
  203. pyrecest-1.0.3/pyrecest/evaluation/iterate_configs_and_runs.py +78 -0
  204. pyrecest-1.0.3/pyrecest/evaluation/perform_predict_update_cycles.py +91 -0
  205. pyrecest-1.0.3/pyrecest/evaluation/plot_results.py +292 -0
  206. pyrecest-1.0.3/pyrecest/evaluation/simulation_database.py +39 -0
  207. pyrecest-1.0.3/pyrecest/evaluation/summarize_filter_results.py +62 -0
  208. pyrecest-1.0.3/pyrecest/filters/__init__.py +153 -0
  209. pyrecest-1.0.3/pyrecest/filters/_linear_gaussian.py +109 -0
  210. pyrecest-1.0.3/pyrecest/filters/_ukf.py +291 -0
  211. pyrecest-1.0.3/pyrecest/filters/abstract_axial_filter.py +73 -0
  212. pyrecest-1.0.3/pyrecest/filters/abstract_dummy_filter.py +49 -0
  213. pyrecest-1.0.3/pyrecest/filters/abstract_extended_object_tracker.py +99 -0
  214. pyrecest-1.0.3/pyrecest/filters/abstract_filter.py +63 -0
  215. pyrecest-1.0.3/pyrecest/filters/abstract_grid_filter.py +52 -0
  216. pyrecest-1.0.3/pyrecest/filters/abstract_multitarget_tracker.py +33 -0
  217. pyrecest-1.0.3/pyrecest/filters/abstract_nearest_neighbor_tracker.py +166 -0
  218. pyrecest-1.0.3/pyrecest/filters/abstract_particle_filter.py +139 -0
  219. pyrecest-1.0.3/pyrecest/filters/abstract_tracker_with_logging.py +65 -0
  220. pyrecest-1.0.3/pyrecest/filters/axial_kalman_filter.py +106 -0
  221. pyrecest-1.0.3/pyrecest/filters/bingham_filter.py +156 -0
  222. pyrecest-1.0.3/pyrecest/filters/circular_particle_filter.py +35 -0
  223. pyrecest-1.0.3/pyrecest/filters/circular_ukf.py +280 -0
  224. pyrecest-1.0.3/pyrecest/filters/euclidean_particle_filter.py +69 -0
  225. pyrecest-1.0.3/pyrecest/filters/gaussian_mixture_phd_filter.py +538 -0
  226. pyrecest-1.0.3/pyrecest/filters/global_nearest_neighbor.py +251 -0
  227. pyrecest-1.0.3/pyrecest/filters/goal_conditioned_replay_imm_filter.py +1551 -0
  228. pyrecest-1.0.3/pyrecest/filters/goal_conditioned_replay_particle_filter.py +1461 -0
  229. pyrecest-1.0.3/pyrecest/filters/gprhm_tracker.py +177 -0
  230. pyrecest-1.0.3/pyrecest/filters/hypercylindrical_particle_filter.py +43 -0
  231. pyrecest-1.0.3/pyrecest/filters/hyperhemisphere_cart_prod_particle_filter.py +117 -0
  232. pyrecest-1.0.3/pyrecest/filters/hyperhemispherical_grid_filter.py +333 -0
  233. pyrecest-1.0.3/pyrecest/filters/hyperhemispherical_particle_filter.py +42 -0
  234. pyrecest-1.0.3/pyrecest/filters/hyperspherical_dummy_filter.py +27 -0
  235. pyrecest-1.0.3/pyrecest/filters/hyperspherical_particle_filter.py +60 -0
  236. pyrecest-1.0.3/pyrecest/filters/hyperspherical_ukf.py +303 -0
  237. pyrecest-1.0.3/pyrecest/filters/hypertoroidal_dummy_filter.py +27 -0
  238. pyrecest-1.0.3/pyrecest/filters/hypertoroidal_fourier_filter.py +414 -0
  239. pyrecest-1.0.3/pyrecest/filters/hypertoroidal_particle_filter.py +67 -0
  240. pyrecest-1.0.3/pyrecest/filters/interacting_multiple_model_filter.py +605 -0
  241. pyrecest-1.0.3/pyrecest/filters/joint_probabilistic_data_association_filter.py +399 -0
  242. pyrecest-1.0.3/pyrecest/filters/kalman_filter.py +133 -0
  243. pyrecest-1.0.3/pyrecest/filters/kernel_sme_filter.py +440 -0
  244. pyrecest-1.0.3/pyrecest/filters/lin_bounded_particle_filter.py +6 -0
  245. pyrecest-1.0.3/pyrecest/filters/lin_periodic_particle_filter.py +6 -0
  246. pyrecest-1.0.3/pyrecest/filters/manifold_mixins.py +66 -0
  247. pyrecest-1.0.3/pyrecest/filters/multi_bernoulli_tracker.py +662 -0
  248. pyrecest-1.0.3/pyrecest/filters/multi_hypothesis_tracker.py +600 -0
  249. pyrecest-1.0.3/pyrecest/filters/piecewise_constant_filter.py +232 -0
  250. pyrecest-1.0.3/pyrecest/filters/random_matrix_tracker.py +128 -0
  251. pyrecest-1.0.3/pyrecest/filters/se2_ukf.py +316 -0
  252. pyrecest-1.0.3/pyrecest/filters/spherical_harmonics_filter.py +248 -0
  253. pyrecest-1.0.3/pyrecest/filters/state_space_subdivision_filter.py +331 -0
  254. pyrecest-1.0.3/pyrecest/filters/toroidal_particle_filter.py +13 -0
  255. pyrecest-1.0.3/pyrecest/filters/toroidal_wrapped_normal_filter.py +20 -0
  256. pyrecest-1.0.3/pyrecest/filters/track_manager.py +972 -0
  257. pyrecest-1.0.3/pyrecest/filters/ukf_on_manifolds.py +318 -0
  258. pyrecest-1.0.3/pyrecest/filters/unscented_kalman_filter.py +167 -0
  259. pyrecest-1.0.3/pyrecest/filters/von_mises_filter.py +64 -0
  260. pyrecest-1.0.3/pyrecest/filters/von_mises_fisher_filter.py +61 -0
  261. pyrecest-1.0.3/pyrecest/filters/wrapped_normal_filter.py +76 -0
  262. pyrecest-1.0.3/pyrecest/sampling/__init__.py +33 -0
  263. pyrecest-1.0.3/pyrecest/sampling/abstract_sampler.py +7 -0
  264. pyrecest-1.0.3/pyrecest/sampling/euclidean_sampler.py +292 -0
  265. pyrecest-1.0.3/pyrecest/sampling/hyperspherical_sampler.py +416 -0
  266. pyrecest-1.0.3/pyrecest/sampling/hypertoroidal_sampler.py +30 -0
  267. pyrecest-1.0.3/pyrecest/sampling/leopardi_sampler.py +533 -0
  268. pyrecest-1.0.3/pyrecest/smoothers/__init__.py +14 -0
  269. pyrecest-1.0.3/pyrecest/smoothers/abstract_smoother.py +137 -0
  270. pyrecest-1.0.3/pyrecest/smoothers/rauch_tung_striebel_smoother.py +296 -0
  271. pyrecest-1.0.3/pyrecest/smoothers/unscented_rauch_tung_striebel_smoother.py +511 -0
  272. pyrecest-1.0.3/pyrecest/tests/__init__.py +0 -0
  273. pyrecest-1.0.3/pyrecest/tests/distributions/__init__.py +0 -0
  274. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_circular_distribution.py +90 -0
  275. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_dirac_distribution.py +27 -0
  276. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_hypercylindrical_distribution.py +115 -0
  277. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_hyperhemispherical_distribution.py +73 -0
  278. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_hypersphere_subset_dirac_distribution.py +79 -0
  279. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_hypersphere_subset_distribution.py +309 -0
  280. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_hyperspherical_distribution.py +102 -0
  281. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_hypertoroidal_distribution.py +42 -0
  282. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_linear_distribution.py +103 -0
  283. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_mixture.py +60 -0
  284. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_periodic_grid_distribution.py +21 -0
  285. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_se2_distribution.py +47 -0
  286. pyrecest-1.0.3/pyrecest/tests/distributions/test_abstract_sphere_subset_distribution.py +88 -0
  287. pyrecest-1.0.3/pyrecest/tests/distributions/test_bingham_distribution.py +47 -0
  288. pyrecest-1.0.3/pyrecest/tests/distributions/test_circular_fourier_distribution.py +201 -0
  289. pyrecest-1.0.3/pyrecest/tests/distributions/test_circular_grid_distribution.py +49 -0
  290. pyrecest-1.0.3/pyrecest/tests/distributions/test_circular_uniform_distribution.py +114 -0
  291. pyrecest-1.0.3/pyrecest/tests/distributions/test_complex_angular_central_gaussian_distribution.py +194 -0
  292. pyrecest-1.0.3/pyrecest/tests/distributions/test_complex_bingham_distribution.py +240 -0
  293. pyrecest-1.0.3/pyrecest/tests/distributions/test_complex_watson_distribution.py +237 -0
  294. pyrecest-1.0.3/pyrecest/tests/distributions/test_custom_hemispherical_distribution.py +85 -0
  295. pyrecest-1.0.3/pyrecest/tests/distributions/test_custom_hypercylindrical_distribution.py +77 -0
  296. pyrecest-1.0.3/pyrecest/tests/distributions/test_custom_hyperrectangular_distribution.py +41 -0
  297. pyrecest-1.0.3/pyrecest/tests/distributions/test_custom_hyperspherical_distribution.py +63 -0
  298. pyrecest-1.0.3/pyrecest/tests/distributions/test_custom_linear_distribution.py +43 -0
  299. pyrecest-1.0.3/pyrecest/tests/distributions/test_disk_uniform_distribution.py +41 -0
  300. pyrecest-1.0.3/pyrecest/tests/distributions/test_ellipsoidal_ball_uniform_distribution.py +29 -0
  301. pyrecest-1.0.3/pyrecest/tests/distributions/test_gaussian_distribution.py +99 -0
  302. pyrecest-1.0.3/pyrecest/tests/distributions/test_generalized_von_mises_distribution.py +68 -0
  303. pyrecest-1.0.3/pyrecest/tests/distributions/test_gssvm_distribution.py +80 -0
  304. pyrecest-1.0.3/pyrecest/tests/distributions/test_hemispherical_uniform_distribution.py +25 -0
  305. pyrecest-1.0.3/pyrecest/tests/distributions/test_hypercylindrical_dirac_distribution.py +167 -0
  306. pyrecest-1.0.3/pyrecest/tests/distributions/test_hypercylindrical_state_space_subdivision_distribution.py +176 -0
  307. pyrecest-1.0.3/pyrecest/tests/distributions/test_hyperhemispherical_bingham_distribution.py +45 -0
  308. pyrecest-1.0.3/pyrecest/tests/distributions/test_hyperhemispherical_grid_distribution.py +375 -0
  309. pyrecest-1.0.3/pyrecest/tests/distributions/test_hyperhemispherical_uniform_distribution.py +60 -0
  310. pyrecest-1.0.3/pyrecest/tests/distributions/test_hyperspherical_dirac_distribution.py +105 -0
  311. pyrecest-1.0.3/pyrecest/tests/distributions/test_hyperspherical_grid_distribution.py +454 -0
  312. pyrecest-1.0.3/pyrecest/tests/distributions/test_hyperspherical_mixture.py +59 -0
  313. pyrecest-1.0.3/pyrecest/tests/distributions/test_hyperspherical_uniform_distribution.py +70 -0
  314. pyrecest-1.0.3/pyrecest/tests/distributions/test_hypertoroidal_dirac_distribution.py +159 -0
  315. pyrecest-1.0.3/pyrecest/tests/distributions/test_hypertoroidal_fourier_distribution.py +516 -0
  316. pyrecest-1.0.3/pyrecest/tests/distributions/test_hypertoroidal_grid_distribution.py +67 -0
  317. pyrecest-1.0.3/pyrecest/tests/distributions/test_hypertoroidal_wrapped_normal_distribution.py +27 -0
  318. pyrecest-1.0.3/pyrecest/tests/distributions/test_linear_dirac_distribution.py +70 -0
  319. pyrecest-1.0.3/pyrecest/tests/distributions/test_linear_mixture.py +47 -0
  320. pyrecest-1.0.3/pyrecest/tests/distributions/test_mardia_sutton_distribution.py +123 -0
  321. pyrecest-1.0.3/pyrecest/tests/distributions/test_multi_hypothesis_tracker.py +114 -0
  322. pyrecest-1.0.3/pyrecest/tests/distributions/test_partially_wrapped_normal_distribution.py +54 -0
  323. pyrecest-1.0.3/pyrecest/tests/distributions/test_piecewise_constant_distribution.py +127 -0
  324. pyrecest-1.0.3/pyrecest/tests/distributions/test_s2_cond_s2_grid_distribution.py +233 -0
  325. pyrecest-1.0.3/pyrecest/tests/distributions/test_sd_cond_sd_grid_distribution.py +355 -0
  326. pyrecest-1.0.3/pyrecest/tests/distributions/test_se2_bingham_distribution.py +153 -0
  327. pyrecest-1.0.3/pyrecest/tests/distributions/test_se2_dirac_distribution.py +124 -0
  328. pyrecest-1.0.3/pyrecest/tests/distributions/test_se2_pwn_distribution.py +101 -0
  329. pyrecest-1.0.3/pyrecest/tests/distributions/test_se3_dirac_distribution.py +45 -0
  330. pyrecest-1.0.3/pyrecest/tests/distributions/test_sine_skewed_distributions.py +213 -0
  331. pyrecest-1.0.3/pyrecest/tests/distributions/test_spherical_harmonics_distribution_complex.py +1355 -0
  332. pyrecest-1.0.3/pyrecest/tests/distributions/test_spherical_harmonics_distribution_real.py +501 -0
  333. pyrecest-1.0.3/pyrecest/tests/distributions/test_state_space_subdivision_gaussian_distribution.py +159 -0
  334. pyrecest-1.0.3/pyrecest/tests/distributions/test_td_cond_td_grid_distribution.py +290 -0
  335. pyrecest-1.0.3/pyrecest/tests/distributions/test_toroidal_fourier_distribution.py +262 -0
  336. pyrecest-1.0.3/pyrecest/tests/distributions/test_toroidal_uniform_distribution.py +84 -0
  337. pyrecest-1.0.3/pyrecest/tests/distributions/test_toroidal_vm_matrix_distribution.py +101 -0
  338. pyrecest-1.0.3/pyrecest/tests/distributions/test_toroidal_vm_rivest_distribution.py +135 -0
  339. pyrecest-1.0.3/pyrecest/tests/distributions/test_toroidal_von_mises_cosine_distribution.py +67 -0
  340. pyrecest-1.0.3/pyrecest/tests/distributions/test_toroidal_von_mises_sine_distribution.py +96 -0
  341. pyrecest-1.0.3/pyrecest/tests/distributions/test_toroidal_wrapped_normal_distribution.py +46 -0
  342. pyrecest-1.0.3/pyrecest/tests/distributions/test_von_mises_distribution.py +46 -0
  343. pyrecest-1.0.3/pyrecest/tests/distributions/test_von_mises_fisher_distribution.py +241 -0
  344. pyrecest-1.0.3/pyrecest/tests/distributions/test_watson_distribution.py +124 -0
  345. pyrecest-1.0.3/pyrecest/tests/distributions/test_wrapped_cauchy_distribution.py +51 -0
  346. pyrecest-1.0.3/pyrecest/tests/distributions/test_wrapped_exponential_distribution.py +85 -0
  347. pyrecest-1.0.3/pyrecest/tests/distributions/test_wrapped_laplace_distribution.py +76 -0
  348. pyrecest-1.0.3/pyrecest/tests/distributions/test_wrapped_normal_distribution.py +53 -0
  349. pyrecest-1.0.3/pyrecest/tests/filters/__init__.py +0 -0
  350. pyrecest-1.0.3/pyrecest/tests/filters/test_axial_kalman_filter.py +207 -0
  351. pyrecest-1.0.3/pyrecest/tests/filters/test_bingham_filter.py +184 -0
  352. pyrecest-1.0.3/pyrecest/tests/filters/test_circular_particle_filter.py +156 -0
  353. pyrecest-1.0.3/pyrecest/tests/filters/test_circular_ukf.py +128 -0
  354. pyrecest-1.0.3/pyrecest/tests/filters/test_euclidean_particle_filter.py +71 -0
  355. pyrecest-1.0.3/pyrecest/tests/filters/test_gaussian_mixture_phd_filter.py +149 -0
  356. pyrecest-1.0.3/pyrecest/tests/filters/test_global_nearest_neighbor.py +381 -0
  357. pyrecest-1.0.3/pyrecest/tests/filters/test_global_nearest_neighbor_pairwise_costs.py +147 -0
  358. pyrecest-1.0.3/pyrecest/tests/filters/test_gnn_cost_matrix_interface.py +79 -0
  359. pyrecest-1.0.3/pyrecest/tests/filters/test_goal_conditioned_replay_common.py +16 -0
  360. pyrecest-1.0.3/pyrecest/tests/filters/test_goal_conditioned_replay_imm_filter.py +114 -0
  361. pyrecest-1.0.3/pyrecest/tests/filters/test_goal_conditioned_replay_particle_filter.py +92 -0
  362. pyrecest-1.0.3/pyrecest/tests/filters/test_gprhm_tracker.py +80 -0
  363. pyrecest-1.0.3/pyrecest/tests/filters/test_hypercylindrical_particle_filter.py +92 -0
  364. pyrecest-1.0.3/pyrecest/tests/filters/test_hyperhemisphere_cart_prod_particle_filter.py +99 -0
  365. pyrecest-1.0.3/pyrecest/tests/filters/test_hyperhemispherical_grid_filter.py +153 -0
  366. pyrecest-1.0.3/pyrecest/tests/filters/test_hyperhemispherical_particle_filter.py +52 -0
  367. pyrecest-1.0.3/pyrecest/tests/filters/test_hyperspherical_dummy_filter.py +85 -0
  368. pyrecest-1.0.3/pyrecest/tests/filters/test_hyperspherical_particle_filter.py +76 -0
  369. pyrecest-1.0.3/pyrecest/tests/filters/test_hyperspherical_ukf.py +246 -0
  370. pyrecest-1.0.3/pyrecest/tests/filters/test_hypertoroidal_dummy_filter.py +83 -0
  371. pyrecest-1.0.3/pyrecest/tests/filters/test_hypertoroidal_fourier_filter.py +509 -0
  372. pyrecest-1.0.3/pyrecest/tests/filters/test_hypertoroidal_particle_filter.py +61 -0
  373. pyrecest-1.0.3/pyrecest/tests/filters/test_interacting_multiple_model_filter.py +145 -0
  374. pyrecest-1.0.3/pyrecest/tests/filters/test_joint_probabilistic_data_association_filter.py +150 -0
  375. pyrecest-1.0.3/pyrecest/tests/filters/test_kalman_filter.py +60 -0
  376. pyrecest-1.0.3/pyrecest/tests/filters/test_kernel_sme_filter.py +413 -0
  377. pyrecest-1.0.3/pyrecest/tests/filters/test_multi_bernoulli_tracker.py +322 -0
  378. pyrecest-1.0.3/pyrecest/tests/filters/test_multi_hypothesis_tracker.py +94 -0
  379. pyrecest-1.0.3/pyrecest/tests/filters/test_piecewise_constant_filter.py +148 -0
  380. pyrecest-1.0.3/pyrecest/tests/filters/test_random_matrix_tracker.py +165 -0
  381. pyrecest-1.0.3/pyrecest/tests/filters/test_se2_ukf.py +206 -0
  382. pyrecest-1.0.3/pyrecest/tests/filters/test_spherical_harmonics_filter.py +181 -0
  383. pyrecest-1.0.3/pyrecest/tests/filters/test_state_space_subdivision_filter.py +248 -0
  384. pyrecest-1.0.3/pyrecest/tests/filters/test_toroidal_particle_filter.py +45 -0
  385. pyrecest-1.0.3/pyrecest/tests/filters/test_toroidal_wrapped_normal_filter.py +39 -0
  386. pyrecest-1.0.3/pyrecest/tests/filters/test_ukf_on_manifolds.py +319 -0
  387. pyrecest-1.0.3/pyrecest/tests/filters/test_unscented_kalman_filter.py +85 -0
  388. pyrecest-1.0.3/pyrecest/tests/filters/test_von_mises_filter.py +47 -0
  389. pyrecest-1.0.3/pyrecest/tests/filters/test_von_mises_fisher_filter.py +48 -0
  390. pyrecest-1.0.3/pyrecest/tests/filters/test_wrapped_normal_filter.py +53 -0
  391. pyrecest-1.0.3/pyrecest/tests/smoothers/__init__.py +0 -0
  392. pyrecest-1.0.3/pyrecest/tests/smoothers/test_rauch_tung_striebel_smoother.py +100 -0
  393. pyrecest-1.0.3/pyrecest/tests/smoothers/test_unscented_rauch_tung_striebel_smoother.py +118 -0
  394. pyrecest-1.0.3/pyrecest/tests/test_backend_interface.py +12 -0
  395. pyrecest-1.0.3/pyrecest/tests/test_backend_size.py +15 -0
  396. pyrecest-1.0.3/pyrecest/tests/test_eot_shape_database.py +82 -0
  397. pyrecest-1.0.3/pyrecest/tests/test_euclidean_sampler.py +115 -0
  398. pyrecest-1.0.3/pyrecest/tests/test_evaluation_basic.py +643 -0
  399. pyrecest-1.0.3/pyrecest/tests/test_history_recorder.py +155 -0
  400. pyrecest-1.0.3/pyrecest/tests/test_hyperspherical_sampler.py +447 -0
  401. pyrecest-1.0.3/pyrecest/tests/test_hypertoroidal_sampler.py +42 -0
  402. pyrecest-1.0.3/pyrecest/tests/test_metrics.py +64 -0
  403. pyrecest-1.0.3/pyrecest/tests/test_nonrigid_point_set_registration.py +224 -0
  404. pyrecest-1.0.3/pyrecest/tests/test_point_set_registration.py +158 -0
  405. pyrecest-1.0.3/pyrecest/tests/utils/test_assignment.py +162 -0
  406. pyrecest-1.0.3/pyrecest/utils/__init__.py +18 -0
  407. pyrecest-1.0.3/pyrecest/utils/_point_set_registration_common.py +304 -0
  408. pyrecest-1.0.3/pyrecest/utils/assignment.py +272 -0
  409. pyrecest-1.0.3/pyrecest/utils/history_recorder.py +152 -0
  410. pyrecest-1.0.3/pyrecest/utils/metrics.py +37 -0
  411. pyrecest-1.0.3/pyrecest/utils/nonrigid_point_set_registration.py +314 -0
  412. pyrecest-1.0.3/pyrecest/utils/plotting.py +61 -0
  413. pyrecest-1.0.3/pyrecest/utils/point_set_registration.py +321 -0
pyrecest-1.0.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Florian Pfaff
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyrecest
3
+ Version: 1.0.3
4
+ Summary: Framework for recursive Bayesian estimation in Python.
5
+ License-File: LICENSE
6
+ Author: Florian Pfaff
7
+ Author-email: pfaff@ias.uni-stuttgart.de
8
+ Requires-Python: >=3.11,<3.15
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Provides-Extra: healpy-support
15
+ Provides-Extra: jax-support
16
+ Provides-Extra: pytorch-support
17
+ Requires-Dist: beartype
18
+ Requires-Dist: matplotlib
19
+ Requires-Dist: mpmath
20
+ Requires-Dist: numpy
21
+ Requires-Dist: pyshtools
22
+ Requires-Dist: scipy (>=1.17.1,<2.0.0)
23
+ Requires-Dist: shapely
24
+ Description-Content-Type: text/markdown
25
+
26
+ # PyRecEst
27
+
28
+ *Recursive Bayesian Estimation for Python*
29
+
30
+ PyRecEst is a Python library tailored for recursive Bayesian estimation, compatible with numpy, pytorch, and jax backends.
31
+
32
+ Features of PyRecEst include:
33
+
34
+ * Distribution and Densities: Provides tools for handling distributions and densities across Euclidean spaces and manifolds.
35
+ * Filters and Trackers: Offers a suite of recursive Bayesian estimators (filters or trackers) for both Euclidean spaces and manifolds. This includes capabilities for:
36
+ * Multi-Target Tracking (MTT)
37
+ * Extended Object Tracking (EOT)
38
+ * Evaluation Framework: Contains an evaluation framework to facilitate comparison between different filters.
39
+ * Sampling Methods: Includes methods for sampling of the distributions and generating grids.
40
+
41
+ ## Usage
42
+
43
+ Please refer to the test cases for usage examples.
44
+
45
+ ## Citation
46
+
47
+ If you use **PyRecEst** in your research, please cite:
48
+
49
+ <table>
50
+ <tr>
51
+ <th>BibTeX</th>
52
+ <th>BibLaTeX</th>
53
+ </tr>
54
+ <tr>
55
+ <td>
56
+ <pre><code class="language-bibtex">@misc{pfaff_pyrecest_2023,
57
+ author = {Florian Pfaff},
58
+ title = {PyRecEst: Recursive Bayesian Estimation for Python},
59
+ year = {2023},
60
+ howpublished = {\url{https://github.com/FlorianPfaff/PyRecEst}},
61
+ note = {MIT License}
62
+ }</code></pre>
63
+ </td>
64
+ <td>
65
+ <pre><code class="language-biblatex">@software{pfaff_pyrecest_2023_software,
66
+ author = {Florian Pfaff},
67
+ title = {PyRecEst: Recursive Bayesian Estimation for Python},
68
+ year = {2023},
69
+ url = {https://github.com/FlorianPfaff/PyRecEst},
70
+ license = {MIT},
71
+ keywords = {Bayesian filtering; manifolds; tracking; Python; NumPy; PyTorch; JAX}
72
+ }</code></pre>
73
+ </td>
74
+ </tr>
75
+ </table>
76
+
77
+ ## Credits
78
+
79
+ - Florian Pfaff (<pfaff@ias.uni-stuttgart.de>)
80
+
81
+ PyRecEst borrows its structure from libDirectional and follows its code closely for many classes. libDirectional, a project to which I contributed extensively, is [available on GitHub](https://github.com/libDirectional). The backend implementations are based on those of [geomstats](https://github.com/geomstats/geomstats).
82
+
83
+ ## License
84
+ `PyRecEst` is licensed under the MIT License.
85
+
@@ -0,0 +1,59 @@
1
+ # PyRecEst
2
+
3
+ *Recursive Bayesian Estimation for Python*
4
+
5
+ PyRecEst is a Python library tailored for recursive Bayesian estimation, compatible with numpy, pytorch, and jax backends.
6
+
7
+ Features of PyRecEst include:
8
+
9
+ * Distribution and Densities: Provides tools for handling distributions and densities across Euclidean spaces and manifolds.
10
+ * Filters and Trackers: Offers a suite of recursive Bayesian estimators (filters or trackers) for both Euclidean spaces and manifolds. This includes capabilities for:
11
+ * Multi-Target Tracking (MTT)
12
+ * Extended Object Tracking (EOT)
13
+ * Evaluation Framework: Contains an evaluation framework to facilitate comparison between different filters.
14
+ * Sampling Methods: Includes methods for sampling of the distributions and generating grids.
15
+
16
+ ## Usage
17
+
18
+ Please refer to the test cases for usage examples.
19
+
20
+ ## Citation
21
+
22
+ If you use **PyRecEst** in your research, please cite:
23
+
24
+ <table>
25
+ <tr>
26
+ <th>BibTeX</th>
27
+ <th>BibLaTeX</th>
28
+ </tr>
29
+ <tr>
30
+ <td>
31
+ <pre><code class="language-bibtex">@misc{pfaff_pyrecest_2023,
32
+ author = {Florian Pfaff},
33
+ title = {PyRecEst: Recursive Bayesian Estimation for Python},
34
+ year = {2023},
35
+ howpublished = {\url{https://github.com/FlorianPfaff/PyRecEst}},
36
+ note = {MIT License}
37
+ }</code></pre>
38
+ </td>
39
+ <td>
40
+ <pre><code class="language-biblatex">@software{pfaff_pyrecest_2023_software,
41
+ author = {Florian Pfaff},
42
+ title = {PyRecEst: Recursive Bayesian Estimation for Python},
43
+ year = {2023},
44
+ url = {https://github.com/FlorianPfaff/PyRecEst},
45
+ license = {MIT},
46
+ keywords = {Bayesian filtering; manifolds; tracking; Python; NumPy; PyTorch; JAX}
47
+ }</code></pre>
48
+ </td>
49
+ </tr>
50
+ </table>
51
+
52
+ ## Credits
53
+
54
+ - Florian Pfaff (<pfaff@ias.uni-stuttgart.de>)
55
+
56
+ PyRecEst borrows its structure from libDirectional and follows its code closely for many classes. libDirectional, a project to which I contributed extensively, is [available on GitHub](https://github.com/libDirectional). The backend implementations are based on those of [geomstats](https://github.com/geomstats/geomstats).
57
+
58
+ ## License
59
+ `PyRecEst` is licensed under the MIT License.
@@ -0,0 +1,73 @@
1
+ [tool.poetry]
2
+ name = "pyrecest"
3
+ description = "Framework for recursive Bayesian estimation in Python."
4
+ readme = "README.md"
5
+ authors = ["Florian Pfaff <pfaff@ias.uni-stuttgart.de>"]
6
+ version = "1.0.3"
7
+
8
+ [tool.poetry.dependencies]
9
+ python = ">=3.11,<3.15"
10
+ numpy = "*"
11
+ scipy = "^1.17.1"
12
+ matplotlib = "*"
13
+ mpmath = "*"
14
+ pyshtools = "*"
15
+ beartype = "*"
16
+ shapely = "*"
17
+
18
+ [tool.poetry.extras]
19
+ healpy_support = ["healpy"]
20
+ pytorch_support = ["torch"]
21
+ jax_support = ["jax", "jaxlib", "autograd"]
22
+
23
+ [tool.poetry.group.dev.dependencies]
24
+ healpy = "*"
25
+ torch = "*"
26
+ jax = "*"
27
+ jaxlib = "*"
28
+ autograd = "*"
29
+ autopep8 = "^2.3.2"
30
+ pytest = "*"
31
+ parameterized = "*"
32
+
33
+ [tool.mypy]
34
+ check_untyped_defs = true
35
+
36
+ [tool.ruff]
37
+ line-length = 180
38
+
39
+ [tool.pytest.ini_options]
40
+ filterwarnings = [
41
+ "ignore::DeprecationWarning:mpmath.*",
42
+ "ignore::scipy.optimize.OptimizeWarning",
43
+ ]
44
+ [tool.pylint.MAIN]
45
+ py-version = "3.13"
46
+ fail-under = 10
47
+ ignore = ["CVS"]
48
+ ignored-modules = ["pyrecest.backend", "healpy"]
49
+
50
+ [tool.pylint."MESSAGES CONTROL"]
51
+ disable = [
52
+ "raw-checker-failed",
53
+ "bad-inline-option",
54
+ "locally-disabled",
55
+ "file-ignored",
56
+ "suppressed-message",
57
+ "useless-suppression",
58
+ "deprecated-pragma",
59
+ "use-symbolic-message-instead",
60
+ "C",
61
+ "W0221",
62
+ "redefined-builtin",
63
+ "cyclic-import",
64
+ ]
65
+
66
+ [tool.pylint.FORMAT]
67
+ max-line-length = 180
68
+
69
+ [tool.pylint.DESIGN]
70
+ max-args = 6
71
+ max-parents = 15
72
+ max-public-methods = 25
73
+ min-public-methods = 0
@@ -0,0 +1 @@
1
+ import pyrecest._backend # noqa
@@ -0,0 +1,2 @@
1
+ [MESSAGES CONTROL]
2
+ disable=all
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Nina Miolane
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,37 @@
1
+ # Backend Interface
2
+
3
+ This folder contains code from the Geomstats project, adjusted for pyRecEst by Florian Pfaff. The original version of Geomstats is authored by Nina Miolane et al., and is a Python package geared towards Riemannian Geometry in Machine Learning.
4
+
5
+ ## Original Project Details
6
+
7
+ - **Title**: Geomstats: A Python Package for Riemannian Geometry in Machine Learning
8
+ - **Authors**: Nina Miolane, Nicolas Guigui, Alice Le Brigant, Johan Mathe, Benjamin Hou, Yann Thanwerdas, Stefan Heyder, Olivier Peltre, Niklas Koep, Hadi Zaatiti, Hatem Hajri, Yann Cabanes, Thomas Gerald, Paul Chauchat, Christian Shewmake, Daniel Brooks, Bernhard Kainz, Claire Donnat, Susan Holmes, Xavier Pennec
9
+ - **Journal**: Journal of Machine Learning Research, 2020, Vol. 21, No. 223, Pp. 1-9
10
+ - **URL**: [Geomstats Project](http://jmlr.org/papers/v21/19-027.html)
11
+
12
+ ## License
13
+
14
+ This code is provided under the MIT License. A copy of the license can be found in this folder.
15
+
16
+ ## Modifications
17
+
18
+ The code in this folder has been modified by Florian Pfaff to adapt it to pyRecEst.
19
+
20
+ ## (Adapted) Usage Instructions
21
+
22
+ In order to expose a new backend function/attribute to the rest of the
23
+ codebase, it is necessary to add the name to the respective list in the
24
+ `BACKEND_ATTRIBUTES` dictionary in `pyrecest/_backend/__init__.py`.
25
+ This serves two purposes:
26
+
27
+ 1. Define a clear boundary between backend interface and backend-internal code:
28
+ Only functions/attributes which are used outside the backend should be made
29
+ available to the rest of the codebase.
30
+ 1. Guarantee each backend exposes the same attributes:
31
+ When loading a backend, the backend importer verifies that a backend
32
+ provides each attribute listed in the `BACKEND_ATTRIBUTES` dict.
33
+ This way, we guarantee that unit tests fail during CI builds when a
34
+ maintainer/contributor forgets to provide an implementation of a feature for
35
+ a particular backend.
36
+ If a feature cannot be supported for some reason, the function should raise
37
+ a `NotImplementedError` for the time being.
@@ -0,0 +1,368 @@
1
+ """Execution backends.
2
+
3
+ Lead authors: Johan Mathe and Niklas Koep.
4
+ """
5
+
6
+ import importlib
7
+ import importlib.abc
8
+ import importlib.machinery
9
+ import logging
10
+ import os
11
+ import sys
12
+ import types
13
+
14
+ import pyrecest._backend._common as common
15
+
16
+
17
+ def get_backend_name():
18
+ return os.environ.get("PYRECEST_BACKEND", "numpy")
19
+
20
+
21
+ BACKEND_NAME = get_backend_name()
22
+
23
+
24
+ BACKEND_ATTRIBUTES = {
25
+ "": [
26
+ # Types
27
+ "int32",
28
+ "int64",
29
+ "float32",
30
+ "float64",
31
+ "complex64",
32
+ "complex128",
33
+ "uint8",
34
+ # Functions
35
+ "abs",
36
+ "all",
37
+ "allclose",
38
+ "amax",
39
+ "amin",
40
+ "angle",
41
+ "any",
42
+ "arange",
43
+ "arccos",
44
+ "arccosh",
45
+ "arcsin",
46
+ "arctan2",
47
+ "arctanh",
48
+ "argmax",
49
+ "argmin",
50
+ "array",
51
+ "array_from_sparse",
52
+ "asarray",
53
+ "as_dtype",
54
+ "assignment",
55
+ "assignment_by_sum",
56
+ "atol",
57
+ "broadcast_arrays",
58
+ "broadcast_to",
59
+ "cast",
60
+ "ceil",
61
+ "clip",
62
+ "comb",
63
+ "concatenate",
64
+ "conj",
65
+ "convert_to_wider_dtype",
66
+ "copy",
67
+ "cos",
68
+ "cosh",
69
+ "cross",
70
+ "cumprod",
71
+ "cumsum",
72
+ "diag_indices",
73
+ "diagonal",
74
+ "divide",
75
+ "dot",
76
+ "einsum",
77
+ "empty",
78
+ "empty_like",
79
+ "equal",
80
+ "erf",
81
+ "exp",
82
+ "expand_dims",
83
+ "eye",
84
+ "flatten",
85
+ "flip",
86
+ "floor",
87
+ "from_numpy",
88
+ "gamma",
89
+ "get_default_dtype",
90
+ "get_default_cdtype",
91
+ "get_slice",
92
+ "greater",
93
+ "has_autodiff",
94
+ "hsplit",
95
+ "hstack",
96
+ "imag",
97
+ "isclose",
98
+ "isnan",
99
+ "isscalar",
100
+ "is_array",
101
+ "is_complex",
102
+ "is_floating",
103
+ "is_bool",
104
+ "kron",
105
+ "less",
106
+ "less_equal",
107
+ "linspace",
108
+ "log",
109
+ "logical_and",
110
+ "logical_or",
111
+ "mat_from_diag_triu_tril",
112
+ "matmul",
113
+ "matvec",
114
+ "maximum",
115
+ "mean",
116
+ "meshgrid",
117
+ "minimum",
118
+ "mod",
119
+ "moveaxis",
120
+ "ndim",
121
+ "one_hot",
122
+ "ones",
123
+ "ones_like",
124
+ "outer",
125
+ "pad",
126
+ "pi",
127
+ "polygamma",
128
+ "power",
129
+ "prod",
130
+ "quantile",
131
+ "ravel_tril_indices",
132
+ "real",
133
+ "repeat",
134
+ "reshape",
135
+ "rtol",
136
+ "scatter_add",
137
+ "searchsorted",
138
+ "set_default_dtype",
139
+ "set_diag",
140
+ "shape",
141
+ "size",
142
+ "sign",
143
+ "sin",
144
+ "sinh",
145
+ "split",
146
+ "sqrt",
147
+ "squeeze",
148
+ "sort",
149
+ "stack",
150
+ "std",
151
+ "sum",
152
+ "take",
153
+ "tan",
154
+ "tanh",
155
+ "tile",
156
+ "to_numpy",
157
+ "to_ndarray",
158
+ "trace",
159
+ "transpose",
160
+ "tril",
161
+ "triu",
162
+ "tril_indices",
163
+ "triu_indices",
164
+ "tril_to_vec",
165
+ "triu_to_vec",
166
+ "vec_to_diag",
167
+ "unique",
168
+ "vectorize",
169
+ "vstack",
170
+ "where",
171
+ "zeros",
172
+ "zeros_like",
173
+ "trapezoid", # Changed from trapz to trapezoid from scipy.integrate
174
+ # The ones below are for pyrecest
175
+ "diag",
176
+ "diff",
177
+ "apply_along_axis",
178
+ "nonzero",
179
+ "column_stack",
180
+ "conj",
181
+ "atleast_1d",
182
+ "atleast_2d",
183
+ "dstack",
184
+ "full",
185
+ "isreal",
186
+ "triu",
187
+ "kron",
188
+ "angle",
189
+ "arctan",
190
+ "cov",
191
+ "count_nonzero",
192
+ "full_like",
193
+ "isinf",
194
+ "isfinite",
195
+ "deg2rad",
196
+ "rad2deg",
197
+ "argsort",
198
+ "max",
199
+ "min",
200
+ "roll",
201
+ "dstack",
202
+ "vmap",
203
+ "gammaln",
204
+ "round",
205
+ "array_equal",
206
+ # For Riemannian score-based SDE
207
+ "log1p"
208
+ ],
209
+ "autodiff": [
210
+ "custom_gradient",
211
+ "hessian",
212
+ "hessian_vec",
213
+ "jacobian",
214
+ "jacobian_vec",
215
+ "jacobian_and_hessian",
216
+ "value_and_grad",
217
+ "value_and_jacobian",
218
+ "value_jacobian_and_hessian",
219
+ ],
220
+ "linalg": [
221
+ "cholesky",
222
+ "det",
223
+ "eig",
224
+ "eigh",
225
+ "eigvalsh",
226
+ "expm",
227
+ "fractional_matrix_power",
228
+ "inv",
229
+ "is_single_matrix_pd",
230
+ "logm",
231
+ "matrix_power",
232
+ "norm",
233
+ "qr",
234
+ "quadratic_assignment",
235
+ "polar",
236
+ "solve",
237
+ "solve_sylvester",
238
+ "sqrtm",
239
+ "svd",
240
+ "matrix_rank",
241
+ "block_diag", # For PyRecEst
242
+ "pinv",
243
+ ],
244
+ "random": [
245
+ "choice",
246
+ "normal",
247
+ "multinomial",
248
+ "multivariate_normal",
249
+ # TODO (nkoep): Remove 'rand' and replace it by 'uniform'. Much like
250
+ # 'randn' is a convenience wrapper (which we don't use)
251
+ # for 'normal', 'rand' only wraps 'uniform'.
252
+ "rand",
253
+ "randint",
254
+ "seed",
255
+ "uniform",
256
+ # For PyRecEst
257
+ "get_state",
258
+ "set_state",
259
+ ],
260
+ "fft": [ # For PyRecEst
261
+ "rfft",
262
+ "irfft",
263
+ "fftshift",
264
+ "ifftshift",
265
+ "fftn",
266
+ "ifftn",
267
+ ],
268
+ "spatial": [ # For PyRecEst
269
+ "Rotation",
270
+ ],
271
+ "signal": [ # For PyRecEst
272
+ "fftconvolve",
273
+ ],
274
+ }
275
+
276
+
277
+ class BackendImporter(importlib.abc.MetaPathFinder, importlib.abc.Loader):
278
+ """
279
+ Meta path finder and loader for dynamically creating backend modules.
280
+
281
+ Implements the modern PEP 451 import protocol (create_module / exec_module).
282
+
283
+ Responsible for intercepting imports of 'pyrecest.backend' and redirecting
284
+ them to dynamically constructed backend implementations (e.g. numpy, torch).
285
+ """
286
+
287
+ def __init__(self, path: str):
288
+ self._path = path
289
+
290
+ @staticmethod
291
+ def _import_backend(backend_name: str):
292
+ try:
293
+ return importlib.import_module(f"pyrecest._backend.{backend_name}")
294
+ except ModuleNotFoundError as e:
295
+ raise RuntimeError(f"Unknown backend '{backend_name}'") from e
296
+
297
+ def _create_backend_module(self, backend_name: str):
298
+ backend = self._import_backend(backend_name)
299
+
300
+ new_module = types.ModuleType(self._path)
301
+ new_module.__file__ = getattr(backend, "__file__", None)
302
+
303
+ # expose chosen backend
304
+ new_module.__backend_name__ = backend_name
305
+ new_module.BACKEND_NAME = backend_name
306
+ new_module.get_backend_name = staticmethod(lambda: backend_name)
307
+
308
+ for module_name, attributes in BACKEND_ATTRIBUTES.items():
309
+ if module_name:
310
+ try:
311
+ submodule = getattr(backend, module_name)
312
+ except AttributeError:
313
+ raise RuntimeError(
314
+ f"Backend '{backend_name}' exposes no '{module_name}' module"
315
+ ) from None
316
+ new_submodule = types.ModuleType(f"{self._path}.{module_name}")
317
+ new_submodule.__file__ = getattr(submodule, "__file__", None)
318
+ setattr(new_module, module_name, new_submodule)
319
+ else:
320
+ submodule = backend
321
+ new_submodule = new_module
322
+
323
+ for attribute_name in attributes:
324
+ try:
325
+ submodule_ = submodule
326
+ if module_name == "" and not hasattr(submodule, attribute_name):
327
+ submodule_ = common
328
+ attribute = getattr(submodule_, attribute_name)
329
+ except AttributeError:
330
+ if module_name:
331
+ raise RuntimeError(
332
+ f"Module '{module_name}' of backend '{backend_name}' "
333
+ f"does not define the required attribute '{attribute_name}'."
334
+ ) from None
335
+ else:
336
+ raise RuntimeError(
337
+ f"Backend '{backend_name}' does not define the required "
338
+ f"attribute '{attribute_name}'."
339
+ ) from None
340
+ else:
341
+ setattr(new_submodule, attribute_name, attribute)
342
+
343
+ return new_module
344
+
345
+ def find_spec(self, fullname, path=None, target=None):
346
+ """Find a module spec for the dynamically created backend."""
347
+ if fullname != self._path:
348
+ return None
349
+ return importlib.machinery.ModuleSpec(fullname, self)
350
+
351
+ def create_module(self, spec):
352
+ """Create the module object but don’t execute it yet."""
353
+ module = self._create_backend_module(BACKEND_NAME)
354
+ module.__loader__ = self
355
+ module.__spec__ = spec
356
+ return module
357
+
358
+ def exec_module(self, module):
359
+ """Execute the module (initialize attributes, types, etc.)."""
360
+ if hasattr(module, "set_default_dtype"):
361
+ module.set_default_dtype("float64")
362
+ logging.info(f"Using {BACKEND_NAME} backend")
363
+
364
+ TARGET = "pyrecest.backend"
365
+ if not any(isinstance(f, BackendImporter) and getattr(f, "_path", None) == TARGET
366
+ for f in sys.meta_path):
367
+ # put it in front so it intercepts 'pyrecest.backend'
368
+ sys.meta_path.insert(0, BackendImporter(TARGET))
@@ -0,0 +1,11 @@
1
+ pytorch_atol = 1e-6
2
+ pytorch_rtol = 1e-5
3
+
4
+ np_atol = 1e-8
5
+ np_rtol = 1e-5
6
+
7
+ jax_atol = 1e-6
8
+ jax_rtol = 1e-5
9
+
10
+ DEFAULT_DTYPE = None
11
+ DEFAULT_COMPLEX_DTYPE = None