Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisWellmann committed Aug 10, 2023
1 parent e7e6519 commit abee480
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ $$\sum_{i=0}^n (z_i - y_i)^2 + \lambda \sum_{i=0}^n (\delta ^p z)_i ^2 $$

where y are the datapoints, z is the smoothed function, and $\delta^2
z$ is the pth derivative of $z_i$, which is evaluated numerically.
A penalty is imposed on nonsmooth functions, with higher values of \lambda increasing the penalty and leading to a smoother output.
A penalty is imposed on nonsmooth functions, with higher values of $\lambda$ increasing the penalty and leading to a smoother output.

The smoothed output can be obtained by solving the linear system
$$x = (W + \lambda * D^T D )^{-1} W y $$
Where W is the weight matrix (Identity matrix in practice) and D is the difference matrix
(See [`difference_matrix`](src/whittaker_smoother.rs) for its construction).

### Examples
Here we see the wood dataset smoothed whith both order 2 and 3.
![wood_2](img/whittaker_on_wood_lambda_20000_order_2.png)
![wood_3](img/whittaker_on_wood_lambda_20000_order_3.png)

Expand Down

0 comments on commit abee480

Please sign in to comment.