ryantibs / quantgen

Tools for generalized quantile modeling
https://ryantibs.github.io/quantgen
14 stars 9 forks source link

Eliminate duplication between `quantile_ensemble_stand` and `quantile_ensemble_flex` #9

Open brookslogan opened 3 years ago

brookslogan commented 3 years ago

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.