Whittaker-Henderson smoothing for Julia
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
src
test
.codecov.yml
.gitignore
.travis.yml
LICENSE.md
README.md
REQUIRE
appveyor.yml

README.md

Whittaker.jl

This package provides implementations for first- and second-order differences Whittaker-Henderson smoothing and interpolation.

Project Status

Whittaker Whittaker Docs Docs

Build Status Build Status Coverage Status

Installation

To install Whittaker.jl, start Julia and run:

Pkg.add("Whittaker")

Example

To interpolate a missing value using first-order differences, the following code can be used:

using Whittaker

y = [1.0, 1.2, 0, 1.6, 1.8]
w = [1.0, 1.2, 0, 1.6, 1.8]
lambda = 0.0001
z = whittaker1(y, w, lambda)

# z = [1.00002, 1.2, 1.4, 1.6, 1.79998]

In order to use second-order differences, use:

z = whittaker2(y, w, lambda)

# z = [0.999997, 1.20001, 1.4305, 1.64575, 1.80004]

Note You can use whittaker1! and whittaker2! to smooth and interpolate in-place.

Credits

The code is based on 'Smoothing and interpolation with finite differences' [Eilers P. H. C, 1994].