Skip to content

Testing pipeline with check_estimator #6594

@cphang99

Description

@cphang99

Hi!

I've been looking at pipelines and as a first step trying to test pipeline with check_estimator. As we can only pass the pipeline object, and there are no default parameters for 'steps', the check_parameters_default_constructible check fails as a no-arg constructor is not possible.

import sklearn.utils.estimator_checks
import sklearn.pipeline
sklearn.utils.estimator_checks.check_estimator(sklearn.pipeline.Pipeline)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/sklearn/utils/estimator_checks.py", line 212, in check_estimator
check_parameters_default_constructible(name, Estimator)
File "/usr/local/lib/python2.7/dist-packages/sklearn/utils/estimator_checks.py", line 1378, in check_parameters_default_constructible
estimator = Estimator()
TypeError: init() takes exactly 2 arguments (1 given)

Is it possible to modify estimator_checks to accomodate this? (possibly to cater for other custom meta-estimators and pipelines?)

Many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions