Skip to content

Missing multi-output checks in common tests #13187

Closed

Description

@rok

Description

Some classifiers and regressors support multi-output, however we do not have a common test for that. We should add it. See discussion in #11458.

We should also remember to remove redundant individual tests introduced by 95993a4.

Example of code for individual test

from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
from sklearn import datasets

X, y = datasets.make_multilabel_classification(n_classes=3)

# Test multi-output classifier
clf = RandomForestClassifier()
clf.fit(X, y.astype(str)).predict(X)

# Test multi-output regressor
rfr = RandomForestRegressor()
rfr.fit(X, y).predict(X)[:3]

Expected Results

No error is thrown for these checks. Some regressors and classifiers are omitted from this check.

Activity

  1. rth commented on Feb 19, 2019

    @rth
    Member

    Thanks for raising this issue!

    It might be worth waiting for #8022 to be merged (probably next week) before adding these tests.

  2. rok commented on Feb 19, 2019

    @rok
    ContributorAuthor

    Thanks for the heads up @rth!
    I looked into it already, so I'll just open a WIP PR anyway and wait for #8022.

  3. rok commented on Mar 5, 2019

    @rok
    ContributorAuthor

    @rth - I opened a PR #13392 for this now.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions