Add cumulative kwarg for solving SampledIntegralProblem#182
Add cumulative kwarg for solving SampledIntegralProblem#182sathvikbhagavan wants to merge 4 commits intoSciML:masterfrom
cumulative kwarg for solving SampledIntegralProblem#182Conversation
solving `SampledIntegralProblem`
|
@ChrisRackauckas can you review this? |
|
I guess it's fine but why should this be done in the solver? What is this doing that cumsum after the solver does not? |
So, the aim is to get back an integrated time series back from a time series. Basically collecting intermediate results. |
src/common.jl
Outdated
|
|
||
| function SciMLBase.init(prob::SampledIntegralProblem, | ||
| alg::SciMLBase.AbstractIntegralAlgorithm; | ||
| alg::SciMLBase.AbstractIntegralAlgorithm; cumulative = false, |
There was a problem hiding this comment.
that breaks type-stability, it needs to be type level information.
There was a problem hiding this comment.
so, we should do cumulative::Bool = false to make it type stable?
There was a problem hiding this comment.
No, it would need to be a value type, Val(false)
|
@sathvikbhagavan I read the pr and I'm not sure this actually does what I would expect. Do you actually need the accuracy of a quadrature rule, or would My perspective is that if new quadrature schemes are added for which all the weights change when a single data point is added, then cumulative integrals are equivalent to doing a sampled integral problem for each sub-sequence. If my data represents a time series and I want the best estimate to the integral at each time step, I would solve a sampled integral problem for each sub-sequence of the data, e.g. for all For example, consider the difference between |
|
@sathvikbhagavan It has been 6 months since you opened this pr so I was wondering if you still need it? With #222 I'm skeptical that using the partial sums is equivalent to computing the integral of the time series |
No description provided.