Fabian Joswig
90c9ce9c73
refactor: unnecessary line in fit parameter detection removed.
...
Iterator variable renamed.
2023-03-14 09:50:35 +00:00
Fabian Joswig
a7a098b861
fix: chisquare, dof and p-value also calculated when dof is 0. Test for
...
dof and chisquare_over_dof added.
2023-03-09 15:32:27 +00:00
Fabian Joswig
99a1033703
refactor: refactored construction of prior Obs in least_squares.
2023-03-09 14:25:37 +00:00
Fabian Joswig
507fa7dbdc
chore: Duplicate check of y-errors removed and Exception made more
...
explicit in least_squares.
2023-03-08 16:52:21 +00:00
Fabian Joswig
80f4eef912
chore: Exception in least_squares specified.
2023-03-08 16:45:29 +00:00
Fabian Joswig
e6051d7ba0
docs: docstring of least_squares updated.
2023-03-07 16:39:37 +00:00
Fabian Joswig
839d9214ed
Improved prior fit ( #161 )
...
* refactor: merged combined fit and prior fit without breaking the
routine. Fitting with priors does not work yet.
* refactor: correlated fits without priors work now.
* refactor: prior error propagation and dof fixed.
* refactor: old prior fit implementation moved to tests.
* refactor: moved _extract_val_and_dval out of least_squares.
* refactor: comment removed.
* tests: additional tests and exceptions added.
* tests: test for constrained prior fit added.
* docs: least_squares docstring extended.
* fix: linting errors fixed.
* feat: additional if cause for fits without priors added to achieve
original speed.
* tests: test_constrained_and_prior_fit fixed.
* fix: fix array cast of least_squares dict mode.
* tests: test for lists in dict fit added.
* fix: additional asarray added in resplot.
Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
2023-03-07 16:15:16 +00:00
Fabian Joswig
82cd2f11ea
fix: multi dim fits fixed in least squares. Test added. ( #160 )
...
Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
2023-03-03 16:35:26 +00:00
Fabian Joswig
2ac38515b6
refactor: logic in least square fits simplified.
...
Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
2023-03-02 18:42:55 +00:00
Fabian Joswig
a140b2ab39
refactor: removed redundant formulations of the chisquare function in
...
least_squares.
2023-03-01 16:29:59 +00:00
Fabian Joswig
ee2944d5b0
refactor: chisqfunc rewritten as sum over residuals.
2023-03-01 16:12:31 +00:00
Fabian Joswig
dc7033e51f
refactor: _standard_fit method made redundant. ( #154 )
...
* refactor: _standard_fit method made redundant.
* fix: xs and yz in Corr.fit promoted to arrays.
* fix: x promoted to array in _combined_fit if input is just a list.
* feat: residual_plot and qqplot now work with combined fits with
dictionary inputs.
* tests: test for combined fit resplot and qqplot added.
* docs: docstring of fits.residual_plot extended.
2023-03-01 10:00:35 +00:00
Fabian Joswig
3ca79581f3
Merge pull request #148 from PiaLJP/feature/correlated_combined_fit
...
Feature/correlated combined fit
2023-02-03 17:05:36 +00:00
ppetrak
b0b5d88dc3
Merge branch 'develop' of https://github.com/PiaLJP/piapyerrors into develop
2023-02-03 15:04:06 +01:00
ppetrak
ba54545b4e
feat/tests: Correlated fits now also work for combined fits.
2023-02-03 14:54:54 +01:00
Fabian Joswig
3236ba54e7
Merge pull request #134 from PiaLJP/develop
...
sample implementation of a (uncorrelated) combined fit
2023-02-02 15:09:11 +00:00
Fabian Joswig
088f4d1239
feat: additional check for invalid input to least_squares added.
...
Co-authored-by: Simon Kuberski <simon.kuberski@uni-muenster.de>
2023-02-02 14:58:35 +00:00
ppetrak
59d22fceee
fix: reduced the migrad solver tolerance + removed unnecessary check
2023-01-30 15:16:41 +01:00
ppetrak
80371a0898
fix/tests: Combined fit now also works when the keys of the x,y & func input dictionaries are not in the same order, build: improvements in performance
2023-01-30 14:26:47 +01:00
Justus Kuhlmann
26447d658c
better docstrings ( #144 )
...
* first example of returns statement in docstring
* added a some return statements for pandas API
* last return statements in pandas input
* added returns to bdio docstrings
* few returns statements added to docstring
* finished docstrings for hadrons submodule
* also finished docstrings for json submodule
* finished misc submodule
* added returns in docstrings in openqQCD
* made some cosmetic chanes to dostrings
* added return nad return statement in docstring
* linting
* Improved docstrings of mpm, fits, roots, misc to have return statements
returns added for misc.py
returns added for mpm.py
reutrns added for fits.py
* linting...
* Some polishing of docstrings
2023-01-16 14:57:22 +00:00
Fabian Joswig
b9cdebd442
feat: gm alias for gamma_method also added to other classes.
2023-01-13 17:26:52 +00:00
ppetrak
80c8a0f979
feat: added (default) method Levenberg-Marquardt, test added
2022-12-20 15:26:13 +01:00
Fabian Joswig
33ff2219ba
fix: Combined fit can now handle list and array inputs for y-values, test added.
2022-12-19 16:06:12 +01:00
Fabian Joswig
140b626aae
fix: Combined fit can now handle list and array inputs for x-values,
...
test added.
2022-12-19 15:15:24 +01:00
ppetrak
3d6ec7b397
fix: flak8 & pytest
2022-12-19 14:03:45 +01:00
ppetrak
500c5234cf
clean-up
2022-12-16 18:55:43 +01:00
ppetrak
9a05fc916a
incorparated (uncorrelated) combined fits in fits.least_squares
2022-12-16 18:47:25 +01:00
Fabian Joswig
19bf558c78
feat: Hotelling t-squared p-value for correlated fits added.
2022-12-06 17:17:03 +00:00
Fabian Joswig
89125c91e2
fix: another bug in num_grad version of prior fit fixed.
2022-10-07 18:02:14 +01:00
Fabian Joswig
ca4f83f5d1
fix: bug in num_grad version of prior fit fixed.
2022-10-07 17:57:02 +01:00
Fabian Joswig
58b8383c1a
feat: hessian added to prior fit and odr fit routines.
2022-10-06 18:07:19 +01:00
Fabian Joswig
b84ea1cc3b
feat: double jacobian in standard fit replaced by hessian
...
This greatly improves performance for numerical derivatives and helps
with readability.
2022-10-06 10:44:06 +01:00
Fabian Joswig
99e130d33c
fix: index of num diff jacobian in least squares fit corrected.
2022-10-05 17:54:25 +01:00
Fabian Joswig
ee4149e498
feat: least_squares fit error propagation can now also be performed via
...
numerical derivatives.
2022-10-05 17:44:38 +01:00
Fabian Joswig
6c6a0f367e
feat: warning for ill conditioned correlation matrix in correlated fit
...
only triggered for condition number > 1e13.
2022-07-18 16:25:33 +01:00
Fabian Joswig
86a45eb47b
refactor: Unused variable in fit function detection removed.
2022-06-24 13:12:53 +01:00
Fabian Joswig
fe9696841f
fix: Exception types for fit function detection specified.
2022-06-24 13:10:06 +01:00
Fabian Joswig
3e29cf9ca8
fix: detection of invalid fit functions extended.
2022-06-24 12:50:26 +01:00
Fabian Joswig
0150ef4c0b
refactor: imports of scipy.stats in fits simplified.
2022-06-15 14:14:01 +01:00
Fabian Joswig
155c329921
fix: bug in error propagation for correlated fits fixed.
2022-06-06 15:47:41 +01:00
Fabian Joswig
6bd724715f
fix: Fit_result.gamma_method can now be called with kwargs
2022-06-06 15:04:16 +01:00
Fabian Joswig
4aae55d1d6
docs: Docstring for fits.least_square extended.
2022-05-31 11:51:59 +01:00
Fabian Joswig
328c564fdd
feat: further improvement of inverse of cholesky decomposed correlation
...
matrix.
2022-05-27 14:00:46 +01:00
Fabian Joswig
09fd1fdf60
feat: rounding errors in inversion of cholesky decomposed correlation
...
matrix reduced.
2022-05-27 13:50:19 +01:00
Fabian Joswig
e7f5961cd6
fix: bug in estimation of chisquare for correlated fit fixed, tests
...
added.
2022-05-26 13:52:05 +01:00
Fabian Joswig
ff5540d667
feat: optimized calculation of the inverse hessian for error propagation
...
in fits.
2022-05-26 10:19:39 +01:00
Fabian Joswig
919ba68a52
feat: When least_squares is called with correlated_fit=True the routine
...
first performs an uncorrelated fit in order to find appropriate starting
parameters.
2022-05-25 17:59:29 +01:00
Fabian Joswig
48636fedb2
docs: warning about ill conditioned hessian more detailed.
2022-05-25 15:20:31 +01:00
Fabian Joswig
967ddb0ecd
fix: no-autograd exception in fits works again.
2022-05-25 14:51:46 +01:00
Fabian Joswig
9ad0146d96
fix: pinv replaced by inv for inversion of hessian in fit module, exceptions and warnings added.
2022-05-25 14:32:49 +01:00