GAA-UAM / scikit-fda

Functional Data Analysis Python package
https://fda.readthedocs.io
BSD 3-Clause "New" or "Revised" License
287 stars 51 forks source link

Integrate `FDataIrregular` using `scipy.integrate.simpson` on each curve separately #608

Closed pcuestas closed 2 months ago

pcuestas commented 3 months ago

Describe the proposed changes

Integration for irregular curves has been implemented using scipy.integrate.simpson to integrate irregular curves (of 1-dimensional domain) one by one.

Additional information

We have not agreed on how integration of irregular data with higher dimensional domains should be defined, so it is not to be implemented yet.

This is a first implementation which may or may not be later improved by manually computing simpson's coefficients, multiply them against the curves' values and calling skfda.representation.irregular._reduceat to add the results.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 86.65%. Comparing base (1ddad0e) to head (56f1512).

Files Patch % Lines
skfda/representation/irregular.py 81.81% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #608 +/- ## ======================================== Coverage 86.65% 86.65% ======================================== Files 156 156 Lines 13314 13322 +8 ======================================== + Hits 11537 11544 +7 - Misses 1777 1778 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.