Collocation
DataDrivenDiffEq.InterpolationMethod — TypeA wrapper for the interpolation methods of DataInterpolations.jl.
Wraps the methods in such a way that they are callable as f(u,t) to create and return an interpolation of u over t. The first argument of the constructor always defines the interpolation method, all following arguments will be used in the interpolation.
The additional keyword crop = false indicates to discard the first and last element of the time series.
Example
# Create the wrapper struct
itp_method = InterpolationMethod(QuadraticSpline)
# Create a callable interpolation
itp = itp_method(u,t)
# Return u[2]
itp(t[2])DataDrivenDiffEq.collocate_data — Functioncollocate_data(data, tpoints; ...)
collocate_data(data, tpoints, kernel; crop, kwargs...)
Unified interface for collocation techniques. The input can either be a CollocationKernel (see list below) or a wrapped InterpolationMethod from DataInterpolations.jl.
Computes a non-parametrically smoothed estimate of u' and u given the data, where each column is a snapshot of the timeseries at tpoints[i].
Examples
u′,u,t = collocate_data(data,tpoints,kernel=SigmoidKernel())
u′,u,t = collocate_data(data,tpoints,tpoints_sample,interp,args...)
u′,u,t = collocate_data(data,tpoints,interp)Collocation Kernels
See this paper for more information.
- EpanechnikovKernel
- UniformKernel
- TriangularKernel
- QuarticKernel
- TriweightKernel
- TricubeKernel
- GaussianKernel
- CosineKernel
- LogisticKernel
- SigmoidKernel
- SilvermanKernel
Interpolation Methods
See DataInterpolations.jl for more information.
- ConstantInterpolation
- LinearInterpolation
- QuadraticInterpolation
- LagrangeInterpolation
- QuadraticSpline
- CubicSpline
- BSplineInterpolation
- BSplineApprox
- Curvefit
Data Processing
DataDrivenDiffEq.DataProcessing — Typestruct DataProcessingDefines a preprocessing pipeline for the data using MLUtils.jl. All of the fields can be set using keyword arguments.
Fields
split: Train test split, indicates the (rough) percentage of training data Default: 1.0shuffle: Shuffle the training data Default: falsebatchsize: Batch size to use, if zero no batching is performed Default: 0partial: Using partial batches Default: truerng: Random seed Default: Random.default_rng()
Note
Currently, only splitobs for a train-test split and DataLoader is wrapped. Other algorithms may follow.
DataDrivenDiffEq.DataNormalization — Typestruct DataNormalization{T<:Union{Nothing, UnitRangeTransform, ZScoreTransform}}A wrapper to normalize the data using StatsBase.jl. Performs normalization over the full problem data given the type of the normalization (Nothing, ZScoreTransform, UnitRangeTransform).
If no nothing is used, no normalization is performed.
Note
Given that DataDrivenDiffEq.jl allows for constants in the basis, the center keyword of StatsBase.fit is set to false. Additionally, constants will be scaled with 1.