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

Skip to content

RANSACRegressor residual_metric has a weird docstring #4740

Closed
@amueller

Description

@amueller

I'm not sure if this is a docstring or an API issue.
The ransac estimator has a residual_metric which has the docstring

Metric to reduce the dimensionality of the residuals to 1 for multi-dimensional target values y.shape[1] > 1. By default the sum of absolute differences is used:

lambda dy: np.sum(np.abs(dy), axis=1)

However, this is also called for y.ndim == 1 (and computes the absolute value there).
It depends a bit on what the intention here is: do we want to define the loss function or how multi-dimensional y behave? or both?

I had to work around the current interface in #4739 a bit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions