jjrandom2 mdl_example
Automatic truncation of basis in leastsquares curve fitting using a family of functions (1D). Given a set of basis functions Phi = {phi_0, phi_1, …, phi_m} (m < n, where n is the number of data points), this fitter will try the subsets {phi_0}, {phi_0, phi_1}, {phi_0, phi_1, phi_2, …, phi_{k1}, phi_k}, …up to and including the original full set Phi, performing a least squares fit to the data for each subset. more…
The optimal value of k is then chosen automatically, based on balancing the least squares error of the fit against total estimated code length (where any deviations from the fitted function are assumed as samples from Gaussian noise).
Supports both trigonometrics and polynomials, and has the required infrastructure to easily support a custom basis (although currently the actual “custom” basis functions used for demonstrating this are hardcoded).
This is based on an exercise in the InformationTheoretical Modeling course (2010).
Technically, this demonstrates the use of code generation using lambda and exec in Python, how to do regex substitutions in Python, and how to use the LaTeX labelling feature of Matplotlib. It also demonstrates how to adjust font size and background transparency in legends. Note that the generated functions operate on NumPy objects without this being known at the definition time.
Cloning this repository:
If you need read and write access use this command:
git clone git@yousource.it.jyu.fi:jjrandom2/mdl_example.git mdl_example
If you only want to clone (and not push) use this command:
git clone git://yousource.it.jyu.fi/jjrandom2/mdl_example.git mdl_example
Then you can go to your repository:
cd mdl_example
 Releases:
Activities

Tuesday August 02 2016

Push
17:31


Monday July 25 2016

Push
15:37


Wednesday June 15 2011

Repository
15:04
Juha Jeronen created repository mdl_example in JJ's random experiments
Automatic truncation of basis in leastsquares curve fitting using a family of functions (1D). Gi...
