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

Base estimator class #1151

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

manuelgloeckler
Copy link
Contributor

@manuelgloeckler manuelgloeckler commented Apr 29, 2024

What does this implement/fix? Explain your changes

Implements an abstract base class for estimators, which has:

  • input_shape
  • condition_shape
  • abstract loss function.

Does this close any currently open issues?

Will close #966.
Will replace #1072 .

Considerations:

  • Density estimator sample and log_prob could be abstract methods, instead of raising a NotImplementedError

@manuelgloeckler manuelgloeckler linked an issue Apr 29, 2024 that may be closed by this pull request
Copy link

codecov bot commented Apr 29, 2024

Codecov Report

Attention: Patch coverage is 62.06897% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 76.98%. Comparing base (afbd5e7) to head (17c5343).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1151      +/-   ##
==========================================
- Coverage   85.08%   76.98%   -8.10%     
==========================================
  Files          90       90              
  Lines        6643     6662      +19     
==========================================
- Hits         5652     5129     -523     
- Misses        991     1533     +542     
Flag Coverage Δ
unittests 76.98% <62.06%> (-8.10%) ⬇️

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

Files Coverage Δ
sbi/neural_nets/density_estimators/base.py 61.70% <62.06%> (+4.55%) ⬆️

... and 23 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Estimator abstractions
1 participant