Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RANSACRegressor should use weighted loss functions #15836

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

Open
Tracked by #16298
jnothman opened this issue Dec 8, 2019 · 5 comments
Open
Tracked by #16298

RANSACRegressor should use weighted loss functions #15836

jnothman opened this issue Dec 8, 2019 · 5 comments

Comments

@jnothman
Copy link
Member

jnothman commented Dec 8, 2019

The current loss functions disregard weights.

See #14325

@jcusick13
Copy link
Contributor

Hi @jnothman, I'd be glad to work on this.

@jnothman
Copy link
Member Author

jnothman commented Dec 14, 2019 via email

@glemaitre
Copy link
Member

glemaitre commented Mar 13, 2024

The following #15952 (comment) is particularly important to fix this bug and questioning the semantic of the sample_weight particularly in the context of the RANSAC estimator.

@glemaitre
Copy link
Member

We add some more thinking regarding this current bug with @ogrisel and how best we can handle it. It seems that we have two directions to go forward.

One possibility is to not pass the sample_weight parameter to the underlying parameter and instead use it at the sampling stage of the RANSAC algorithm. In expectation, we should respect the semantic and property associated with the sample_weight in scikit-learn. We should be testing this behaviour and properties: zero-weights should be equivalent to not consider the sample while a weight of 2 should be equivalent to observe twice the same sample (duplicate it).

The proposal in #23371 is an alternative where we can impact the thresholding by computing the weighted median and dispersion to select the subset of data to fit a weighted model. But we are unsure if it will retain the properties above.

@ogrisel
Copy link
Member

ogrisel commented May 6, 2024

Related to #11316.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants