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

Debug for interpolator deduction of NeymanConstructor #165

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Jun 7, 2024

When deducing the interpolator, we collect the threshold for each combination of nominal_values and generate_value. Then make an interpolator whose x are generate_value and y are the thresholds. This line was meant to assign a 1D array to the map:

values[indices] = [

But when the dimension of the generate_values is high, which means indices is a list, values[indices] is not a 1D array but values[tuple(indices)] is actually the function we want.

Demo:

>>> import numpy as np
>>> array = np.empty((2, 3, 4))
>>> array[[1, 0]].shape
(2, 3, 4)
>>> array[tuple([1, 0])].shape
(4,)

@coveralls
Copy link

coveralls commented Jun 7, 2024

Pull Request Test Coverage Report for Build 9417365502

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 92.043%

Totals Coverage Status
Change from base Build 9417362318: 0.06%
Covered Lines: 1550
Relevant Lines: 1684

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 7, 2024

Pull Request Test Coverage Report for Build 9417367161

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.983%

Totals Coverage Status
Change from base Build 9417362318: 0.0%
Covered Lines: 1549
Relevant Lines: 1684

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9417367161

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.983%

Totals Coverage Status
Change from base Build 9417362318: 0.0%
Covered Lines: 1549
Relevant Lines: 1684

💛 - Coveralls

@dachengx dachengx marked this pull request as ready for review June 7, 2024 13:05
@@ -472,7 +478,6 @@ def get_confidence_interval_thresholds(
)

# get the poi_values and threshold_values for interp1d
interpolator = None
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand why we have this line. So remove it.

Copy link
Collaborator

@hammannr hammannr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @dachengx !

@dachengx dachengx merged commit b680c34 into main Jun 7, 2024
7 checks passed
@dachengx dachengx deleted the debug_neyman_constructor branch June 7, 2024 15:17
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.

3 participants