Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Linear fitting 2.0 #1462

Closed

Commits on Jul 2, 2018

  1. Linearity attribute to parameters

    Squashed commit containing most changes made to components
    
    Old commit message:
    Added linearity attributes (and cleared up two typos).
    I am uncertain about the correct approach to the expression component
    (currently set any parameter’s is_linear to False).
    
    I am also unsure about which parameters are linear for the heaviside,
    voigt, RC, PESCORELineShape (with shirley) and EELS_vignetting.
    
    "Better safe than sorry" attitude with linear components, but set heaviside linear.
    
    Fixed linearity of expression
    
    Temp fix for Expression, until removing is_linear = False attribute.
    
    I feel like an idiot for writing what I did.
    
    Parameters default to parameter.is_linear = False
    
    Removed parameter.is_linear = False in favour of default setting = False.
    
    Removed existance of .function method which existed for some reason in expression.
    
    Removed linear=False from heaviside.
    
    Fixed a typo on the Expression example
    
    Sympy now checks Expression for linear components
    
    Added tests
    
    Simplified sympy check and moved it out of class
    
    Better function name
    
    Now correct check of linearity
    
    Clarified code
    
    Added a test case
    
    Sympy extract constant part of expression with respect to variables
    
    Made is_linear protected
    
    Added constant term property to expression
    
    Added docstring
    
    Added check for only one linear parameter per component. + TIdy
    
    Fixed tests and "one linear" check
    
    Docstring + tidying
    
    Fixed missing _is_linear
    
    Offset is y=k, not y=k+x
    
    set Offset _is_linear True
    
    fixed (my) bug in Offset component
    
    Fixed test failing
    
    Added polynomial constant, needs a look
    
    Corrected expression constant extractor + tests
    
    indent typo
    
    Working with constant term
    
    Remove component._constant_parameters as it doesn't make sense if constant is free
    thomasaarholt authored and Thomas Aarholt committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    c7e2d15 View commit details
    Browse the repository at this point in the history
  2. Linear model fitting functions

    Added three linear fitters
    
    Added imports and docstring
    
    Added tests
    
    Some PEP changes
    
    Added bounds to lsq_linear
    
    Added test for bounded lsq_linear
    
    Ensure that linear components aren't initialised at zero
    
    Some formatting
    
    Ensure components don't get added twice
    
    Renamed "linear_lsq" to "linear"
    
    Reordering priority of fitters
    
    If fitter is None, use linear if model is linear
    
    Supports case of one component being inactive
    
    Fix fitting with inactive components for other fitters
    
    one file changed?
    
    check these changes
    
    Fixed for SI and changed warnings to logging INFO
    
    Removed print statement
    
    Cleared up some code, fixed a bug
    
    Cleaned code, fixed axis bug
    
    Fixed linear fitting with bounds
    
    made methods private
    
    deleted obsolete method
    
    fixed tests
    
    some language and cleanup
    
    Corrected binned signal fitting for linear
    
    fixed truedivide error
    
    Removed the other two forms of linear fitting. Can add later.
    
    minor cleaning up
    
    removed print statement
    
    Added preliminary support for convolved components
    
    Fixed transposing errors
    
    Removed old function and print statements
    
    fixed test error
    
    Fixed changed signal range breaking
    
    Removed remnants of other linear fitters
    
    More remnants
    
    autopep8
    
    typo
    
    Working for convolved, nonconvolved, free and fixed components
    
    Add support for linear fitting with a free offset, by either component or parameter
    
    Update p0 and subtract free offsets from model, adding it as a type of component instead
    
    some tests
    
    code reduced, but slow?
    
    twinned case must be considered
    thomasaarholt authored and Thomas Aarholt committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    f944595 View commit details
    Browse the repository at this point in the history
  3. Documentation

    Documentation 2.0. Thanks @tjof2
    
    clearer docs
    
    corrections to docs
    
    Deleted some unnecessary lines from linear fitting docs
    thomasaarholt authored and Thomas Aarholt committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    c3b0849 View commit details
    Browse the repository at this point in the history
  4. TEST rearranged tests and fixed typo bug

    thomasaarholt authored and Thomas Aarholt committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    3b2300f View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2018

  1. Squash: Linear Model and EELS fitting

    MODEL: Underscore bug
    
    MODEL: default fitter no longer from prefs
    
    MODEL: Working with twins but not in pseudocomponents
    
    fix twin situation
    
    fix twin situation
    
    moved test files
    
    removed old case for appending components
    
    Change test case to use artificial data
    
    add standard error
    
    Remove old code
    
    TEST: Add and remove test cases, and fix hydrogenic
    
    Cleaned up linear fitting procedure, simplified linear model estimation procedure and formatted code
    
    Removed unused code, cleaned up with pep8
    
    moved error message
    
    Rewrote component function calls to support multidimensional models
    
    fixed small bugs with previous commits
    
    more fixes to the previous, now working
    
    made expression fix_free separation 2D-able
    
    corrected shape
    
    Add 2D model support for linear fitting
    
    Added test cases for model2D linear fitting
    
    model.py typo
    
    hotfix for Zanetta
    
    large multifit update - mostly working
    
    need to fix expression multi
    
    getting closer
    
     minor
    
    new twin tactic
    
    much changes
    
    beginning of EELS CL support
    
    further changes to eels
    
    modified convolve. Nearly there
    
    further GOS changes
    
    hello
    
    fixed Model2D
    thomasaarholt committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    01ac899 View commit details
    Browse the repository at this point in the history
  2. Make most components multi-compatible

    updated bleasdale to take parameters in function call
    
    remove print
    
    readied most comps for linear multifit
    
    minor
    
    fixing components and adding tests
    thomasaarholt committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    acc7002 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2018

  1. remove unused code

    remove unused code
    
    docstring and PEP improvements
    
    update docs
    
    remove old lsq_linear reference
    
    remove old import
    
    fixed fit_component and signal_range
    thomasaarholt committed Jul 23, 2018
    Configuration menu
    Copy the full SHA
    efccaff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    187da73 View commit details
    Browse the repository at this point in the history