-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate FDataIrregular
using scipy.integrate.simpson
on each curve separately
#608
Conversation
@@ -23,6 +22,7 @@ | |||
import numpy as np | |||
import pandas.api.extensions | |||
from matplotlib.figure import Figure | |||
import scipy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
I001 isort found an import in the wrong position
skfda/representation/irregular.py
Outdated
raise NotImplementedError() | ||
if self.dim_domain != 1: | ||
raise NotImplementedError( | ||
"Integration only implemented for 1D domains." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
C812 missing trailing comma
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #608 +/- ##
========================================
Coverage 86.65% 86.65%
========================================
Files 156 156
Lines 13314 13322 +8
========================================
+ Hits 11537 11544 +7
- Misses 1777 1778 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
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.