Skip to content

Commit

Permalink
Show an example usage
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisWellmann committed Aug 11, 2023
1 parent e14eab1 commit cd6f31f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ To use this smoother in you project, add this to your `Cargo.toml`:
whittaker_smoother = "0.1"
```

Now you can use the smoothing function as such:
```rust
// Here we use the WOOD_DATASET, but this can be any series that you would like to smooth
let raw = Vec::from_iter(WOOD_DATASET.iter().map(|v| *v as f64));
let lambda = 2e4;
let order = 3;
let smoothed = whittaker_smoother(&raw, lambda, order).unwrap();
```
And BAM, that's it! There is you perfectly smoothed series.

### Further Reading:
See the [papers](./papers/) folder for two papers showing additional details of the method.

Expand Down

0 comments on commit cd6f31f

Please sign in to comment.