Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Metadata routing in pipeline for adapt.feature_based.FA #138

Open
@g-simmons

Description

I am using FA wrapped around an sklearn predictor in an sklearn Pipeline. Basically Pipeline([("some_name",FA(SomePredictor()))])

fit and transform methods have signatures:

fit(X, y[, Xt, yt, domains])

fit_estimator(X, y[, sample_weight, ...])

fit_transform(Xs, Xt, ys, yt[, domains])

but set_fit_request and set_transform_request have the following signatures.

set_fit_request(*[, domains])

set_transform_request(*[, domain])

When I call pipeline.fit() without ys and yt, I get:

FA.fit_transform() missing 2 required positional arguments: 'ys' and 'yt'

But when I call it with ys and yt, I get

TypeError: Pipeline.fit got unexpected argument(s) {'ys', 'yt'}, which are not routed to any object.

One would think this could be solved by calling set_fit_request({'ys':True, 'yt':True}), but when I do that, I get errors like:

TypeError: Unexpected args: {'yt'} in transform. Accepted arguments are: {'domain'}

Is there an MWE of using FA in an sklearn Pipeline somewhere?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /