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

feat: implement FitResult.count_number_of_parameters #291

Merged
merged 6 commits into from
Jun 23, 2021

Conversation

redeboer
Copy link
Member

Closes #290

  • Added a method FitResult.count_number_of_parameters()
  • Constructor arguments of FitResult are now validated. This is to ensure that functions and methods like count_number_of_parameters() keep working.
  • All parameters in FitResult are now 'pretty printed' below each other, e.g.:
    FitResult(
     minimum_valid=True,
     execution_time=2.9841978549957275,
     function_calls=166,
     estimator_value=-7579.247627538372,
     parameter_values={
      'm_f(0)(980)': 0.989885368944097,
      'Gamma_f(0)(980)': 0.060228379644260165,
     },
     parameter_errors={
      'm_f(0)(980)': 0.0010628340144144574,
      'Gamma_f(0)(980)': 0.0016523232241513362,
     },
    )
  • AIC and BIC example provided in documentation.
  • Using type alias ParameterValue where possible instead of Union[...].

@redeboer redeboer added 📝 Docs Improvements or additions to documentation 🔨 Maintenance Maintenance and upkeep improvements 💡 Feature labels Jun 23, 2021
@redeboer redeboer added this to the 0.3.0 milestone Jun 23, 2021
@redeboer redeboer requested a review from Leongrim June 23, 2021 14:38
@redeboer redeboer self-assigned this Jun 23, 2021
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@redeboer redeboer changed the title Improve fit result feat: implement FitResult.count_number_of_parameters Jun 23, 2021
@redeboer
Copy link
Member Author

redeboer commented Jun 23, 2021

@Leongrim, hope you agree with #290 (comment), that this PR serves as a sufficient solution to #290. For AIC and BIC, see changes to step 3.

@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #291 (2c60e8f) into main (272a9b7) will decrease coverage by 0.70%.
The diff coverage is 76.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #291      +/-   ##
==========================================
- Coverage   81.25%   80.54%   -0.71%     
==========================================
  Files          13       13              
  Lines         816      843      +27     
==========================================
+ Hits          663      679      +16     
- Misses        153      164      +11     
Flag Coverage Δ
unittests 80.54% <76.92%> (-0.71%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/tensorwaves/interfaces.py 76.14% <65.71%> (-6.00%) ⬇️
src/tensorwaves/estimator.py 73.33% <100.00%> (ø)
src/tensorwaves/model.py 72.27% <100.00%> (ø)
src/tensorwaves/optimizer/_parameter.py 100.00% <100.00%> (ø)
src/tensorwaves/optimizer/callbacks.py 75.00% <100.00%> (+0.13%) ⬆️
src/tensorwaves/optimizer/minuit.py 93.22% <100.00%> (ø)
src/tensorwaves/optimizer/scipy.py 93.10% <100.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📝 Docs Improvements or additions to documentation 🔨 Maintenance Maintenance and upkeep improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement AIC and BIC
1 participant