diff --git a/README.md b/README.md index ea0e221..6f53046 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ $$\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 $$ @@ -15,6 +15,7 @@ Where W is the weight matrix (Identity matrix in practice) and D is the differen (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)