Skip to content

Commit

Permalink
Readme mathematical presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mfalt committed Feb 28, 2018
1 parent 4e63b92 commit a16d210
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,28 @@

This package solves the problem of piecewise linear, *continuous*, approximation subject to either a hard limit or a regularization penalty on the number of break points. An exact solution is obtained using dynamic program over piecewise quadratic function, which avoids the combinatorial complexity of a naive approach.

(FIXME: Mathematical formulation)
### Mathematical Description

We want to find a piecewise linear, continuous function ![f_{I,Y}](figures/f_IY.svg) with few segments, where `I` is the set of breakpoints, and `Y` are the values of the function at those breakpoints. This problem can be formulated as a constrained problem

![Problem Formulation Constrained](figures/problemConstrained.svg)

where `M` is the number of segments, or as a regulartized problem

![Problem Formulation Regularized](figures/problemRegularized.svg)

These problems can be solved for a discrete set of points `g` using
```julia
I, Y, v = fit_pwl_constrained(g, M)
I, Y, v = fit_pwl_regularized(g, ζ)
```
where the resulting function satisfies `f(I[k]) = Y[k]`,
or for a general function `g: ℝ ⟶ ℝ` with
```julia
I, Y, v = fit_pwl_constrained(g, t, M)
I, Y, v = fit_pwl_regularized(g, t, ζ)
```
where `t` is the set of possible breakpoints and the resulting function satisfies `f(t[I[k]]) = Y[k]`.
### Example: Constrained approximation

Find best continouous piecewise approximations with up to M segments
Expand Down
5 changes: 5 additions & 0 deletions figures/f_IY.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a16d210

Please sign in to comment.