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

Eliminate duplication between quantile_ensemble_stand and quantile_ensemble_flex #9

Open
brookslogan opened this issue Jul 21, 2021 · 0 comments

Comments

@brookslogan
Copy link

quantile_ensemble_stand and quantile_ensemble_flex contain a lot of similar code; for maintenance and development, and sharing performance improvements, it may be better to reduce or eliminate duplication.

Using #8, quantile_ensemble_flex should be significantly faster than before if all taus are in the same group. It may have similar or better performance to quantile_ensemble_stand and seems like with noncross=FALSE it would produce the same output if the class&shape of alpha is ignored. However, this makes no difference for the user-facing function quantile_ensemble, which dispatches to quantile_ensemble_stand if there is only a single tau group.

  • decide whether to make a breaking change and have quantile_ensemble return a matrix alpha even when there is only a single tau group
  • implement quantile_ensemble_stand by calling quantile_ensemble_flex with noncross=FALSE and other appropriate arguments, and then converting alpha or not depending on the above decision --- OR, if alpha will always be a matrix, consider eliminating quantile_ensemble_stand and maybe quantile_ensemble_flex altogether, putting the common code directly into quantile_ensemble
  • add characterization tests for the single-tau-group case and make sure the above changes do not break them
  • benchmark old and new implementations to make sure this is matching or improving the speed of the current quantile_ensemble_stand
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

No branches or pull requests

1 participant