Repository navigation
ENH: robust: tools and more norms - #9186
Conversation
|
Hello @josef-pkt! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2024-04-11 20:53:04 UTC |
e56e873 to
64c0305
Compare
64c0305 to
6cad5ad
Compare
|
extra keywords are a bit of a pain when we need to create norm instances in helper function currently
It looks like one possibility would be to add a setter or update method for the tuning parameter. One of these will be max_rho that is needed for the breakdown computation. This is also currently hardcoded for only norms that have "c" as tuning parameter and attribution. If we want to attach relative efficiency, breakdown point or similar properties of the norm, then those should be cached because they are more expensive to compute, especially when we need numerical integration and/or rootfinding. What we might be able to use for the extra kwargs is something like a partial function, but for instance creation. Parameterized link function for GLM might have similar applications, but we don't have yet any code that needs to change the Link parameters. (Users can just create new link instances in e.g. a profile likelihood optimization.) Sounds like adding update |
|
aside typo in docstring for Andrews rho |
|
Currently there is no boundary and feasibility checking for the We might run into corner or feasibility problems, but so far I only check "standard" case. There are some conditions on max_rho, breakdown point and feasible solution for M-scale in the literature but I never paid close attention to those. I will leave those for when the problems actually show up in examples. |
|
another issue: attributes for properties of norms e.g. redescending
Only redescending norms (finite max_rho) are used in M-scale with large breakdown point. However, AFAIU, we can compute the M-scale also for non-redescending norms, although I have not seen that used in the literature. Using leastsquares norm for M-scale should just give variance. reminder (I just remembered): update Aside: I added |
| return bp | ||
|
|
||
| res = [] | ||
| for bp in bps: |
Check failure
Code scanning / CodeQL
Non-iterable used in for loop
|
numerical problems test_tools takes now (next commit) 1 min. that means For actual use by users, I'm planning to add hardcoded, precomputed tables with common values for efficiency and breakdown points, e.g. 5% intervals. Also there might be a lower bound on efficiency for non-redescending norms. unit tests are only for |
|
checking breakdown point for norm M-scale, S-estimator Not what I expected Quartic: has lower efficiency than biweight at the same breakdown point. If we use the same c in the norms, then eff is increasing in k. But that's not really relevant because we always adapt the tuning parameter to the norm. This makes the Quartic norms a lot less interesting, max_rho for it is too large to provide a better S-estimator. The quartic norm has a larger almost linear segment around 0 than biweight, so it might still be useful for "something". |
94a6068 to
25976ac
Compare
18b6ced to
05703b4
Compare
05703b4 to
2fa3396
Compare
|
all green, merging not included in this PR: next |
related
#8808
#1372
this adds tools for asymptotic efficency, breakdown point computation and choice of tuning parameter of norms.
currently only for univariate
this adds some additional norms, TukeyQuartic and StudentT (I also have Cauchy norm, but might leave it out as special case of StudentT with df=1)
plan for next, either in this PR or next PR are more general (M-)scale estimators #9171