Skip to content

[Feature] Weighted Least Squares algorithm #110

@oliverchampion

Description

@oliverchampion

Feature description

We are writing a recommendations paper recommending WLS fitting. Currently, Ben implemented a WLS based on the recommendations paper, but did this from scratch (no dedicated tools). I would be curious as to how "reproducible" our recommendations are (i.e. people who read the paper and implement the algorithm may still end up with different solutions). This would be very valuable information and would strongly point to the need for an open source repository (us!)

If you want to work on this, pop me (oliverchampion) a message and I can send you the wording in the recommendations paper.

Describe the solution

A WLS in accoordance with the recommendations paper.

We could add a WLS recommendations approach based on this paper https://www.sciencedirect.com/science/article/pii/S1053811913005223 but using the build in WLS from statsmodel:

https://www.statsmodels.org/stable/generated/statsmodels.robust.robust_linear_model.RLM.html#statsmodels.robust.robust_linear_model.RLM

Comment from Eric:
If the iterative route is the way, here's the documentation for the weighting functions you can choose in RLM: https://www.statsmodels.org/dev/rlm.html#norms
And here are the plots of those functions: https://www.statsmodels.org/dev/rlm_techn1.html

The stopping and iteration is here: https://www.statsmodels.org/stable/generated/statsmodels.robust.robust_linear_model.RLM.fit.html#statsmodels.robust.robust_linear_model.RLM.fit
I think the re-weighting is also there, in the scale_est parameter. I think the mad option there might be somewhat similar to what you're using?

It's definitely more complicated but it might be worth exploring as it has some more options and comes pre-tested.

Describe alternatives

Anyone with alternative ways to implement the approach, please do! The more the merrier for our point.
E.g. in Matlab?

Additional context

No response

Are you working on this?

None

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions