Skip to content

Fix TransformedTargetRegressor should automatically set_fit_request on internal LinearRegression #6

@StefanieSenger

Description

@StefanieSenger

This raises an error that the user cannot do anything about, since instead we should internally set_ fit_request:

import numpy as np
from sklearn.compose import TransformedTargetRegressor
from sklearn.utils._metadata_requests import process_routing

print(process_routing(TransformedTargetRegressor(), "fit", sample_weight=np.array([1,1,2])))

I would like to investigate and make a PR to fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions