Skip to content

ENH: Amend TestQuantile::test_quantile_identification_equation (#9211) - #24352

Closed
chunweiyuan wants to merge 1 commit into
numpy:mainfrom
chunweiyuan:simplify_quantile_identification_test
Closed

chunweiyuan wants to merge 1 commit into
numpy:mainfrom
chunweiyuan:simplify_quantile_identification_test

Conversation

@chunweiyuan

Copy link
Copy Markdown

This PR amends the TestQuantile::test_quantile_identification_equation module in numpy/lib/, to better reflect the identification formula (Eq. 5 of https://doi.org/10.48550/arXiv.0912.0902) it refers to.

@chunweiyuan
chunweiyuan force-pushed the simplify_quantile_identification_test branch from cee013e to d684454 Compare August 7, 2023 20:48
@seberg

seberg commented Aug 8, 2023

Copy link
Copy Markdown
Member

@lorentzenchr could you have a look?

@lorentzenchr lorentzenchr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think there is a slight misunderstanding. In my point of view the proposed changes worsens the current code.

# Test that the identification equation holds for the empirical
# CDF:
# E[V(x, Y)] = 0 <=> x is quantile
# dE[V(x, Y) * (x - y)]/dx = 0 <=> x is quantile

@lorentzenchr lorentzenchr Aug 8, 2023 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is not correct. The old formula is correct, i.e. identification functions can be used as generalized Z-Estimators.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I went by Eq. 6 of the Gneiting paper, and I presume you went by Eq. 13?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes. 6 is for scoring functions, 13 for identification functions.

@chunweiyuan

Copy link
Copy Markdown
Author

Upon further thought, I think the original test is better. Please ignore/reject this PR. Thanks.

@seberg seberg closed this Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

4 participants