MaternSpline
a position-error and low-pass correlated velocity smoothing model
Declaration
classdef MaternSpline < BSpline
Overview
The BSpline
Topics
- Initializing
MaternSpline
compute the solution to the position-error velocity model
- Primary attributes
noiseDistribution
distribution of the noiset
observation times (array of values for the independent axis)x
observed positions (array of values for the dependent axis)
- Manipulating model parameters
M
number of low-pass splineslambda
velocity penaltymaternAlpha
matern slope parametermaternT
matern time scale
- Accessing model properties
L
Cholesky decomposition of the velocity covariancePhf
high-frequency projection operatorPlf
low-frequency projection operatorU
Matern-correlated high-pass-filtered velocity of N splines at points tqVV
velocity penalty matrixVhf
high-pass filtered velocity of N splines at points tqVq
velocity (first derivative) of N splines at points tqW
weight matrix for the position errorsX
N splines at the N observations time (t)Xm
M low-pass splines at the N observations time (t)hfSpline
spline representation of the high-frequency part of the solutionlfSpline
spline representation of the low-frequency part of the solutionmaxLambda
largest value of lambda different from infinity for double precisionmidLambda
a good starting value for lambdaminLambda
lowest value of lambda different from zero for double precisiontKnotM
knot points for the M low-pass splinestq
the (t)ime (q)uadrature grid
- Estimating error and likelihood
epsilon
differences between the observed positions (x) and the model positionsepsilonInRange
differences between the observed positions (x) and the model positionsexpectedMeanSquareError
The expected mean-square error normalized by theexpectedMeanSquareErrorFromCV
Cross-validation (CV) estimate for the mean square errorexpectedMeanSquareErrorFromGCV
Generalized cross-validation (GCV) estimate for the mean-square errorexpectedMeanSquareErrorInPercentileRange
The expected mean-square error within an expected percentile range, normalized by the variance.logLikelihood
likelihood that the observed data fits the modelsmoothingMatrix
smoothing matrix maps observations to their smoothed values
- Minimizing error
minimizeOnLambda
minimize a penalty function by performing a search on lambdaminimizeOnM
minimize a penalty function by performing a grid search on MminimizeOnMaternT
minimize a penalty function by performing a search on maternTminimizeOnParameters
minimize a penalty function by performing a search a defined set of parameter values- Parameter structure
appendParametersWithPenalty
append parameter struct with current valuesparameters
parameter struct with current valuesparametersForGrid
parameter struct with current valuesparametersWithPenalty
parameter struct with current valuessetParameters
set parameters to new values
- Searching parameter space (Static methods)
appendParametersToParameters
append a parameter structure to another structuregridSearchOnLambda
perform a grid search on lambdagridSearchOnM
perform a grid search on MgridSearchOnMaternT
perform a grid search on maternTlogWrapper
wraps a penalty function to take log10(lambda)minimizeOnLambdaBounded
minimize a penalty function by performing a bounded search on lambdasearchOnLambda
perform a search on lambda, returning penalty function valuessearchOnParameters
evaluate penalty functions at each set of parameter values
- Methodology (Static methods)
knotPointsForDataPoints
create knot points appropriate for observation times tpevModelLambdaRange
range of lambda values for position-error velocity modelpevModelLogLikelihood
log-likehood of the position-error-velocity modelpevModelSmoothingMatrix
smoothing matrix of the position-error velocity modelpevModelSolution
compute the solution to the position-error velocity model
- Caching variables
LFromCache
return a Cholesky autocovariance from the cache for given maternLMaternTMap
cache of computation of the Matern Cholesky matrixaddLToCache
add a Cholesky autocovariance to the cache for given maternsanitizeCacheForK
clears the self.variableCache of any variables depedent on spline order KsanitizeCacheForM
clears the self.variableCache of any variables depedent on MsanitizeCacheForMaternParameters
clears the self.variableCache of any variables depedent on the maternvariableCache
cache of computational expensive variables
- Internal
didSetMultipleParameters
called after setting multiple parameterskParameterDidChange
notification that K changed and opportunity to clear caches,lambdaParameterDidChange
notification that M changed and opportunity to clear caches,mParameterDidChange
notification that M changed and opportunity to clear caches,maternParametersDidChange
notification that maternT or maternAlpha changed andrecomputeSolution
recompute the solution the position-error velocity modelshouldRecomputeSolution
boolean indicating whether or not to compute solutionswillSetMultipleParameters
called before setting multiple parameters to prevent
- Other