8000 Common tests: Check that fit is idempotent, i.e. fitting an estimator twice gives the same result · Issue #11883 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Common tests: Check that fit is idempotent, i.e. fitting an estimator twice gives the same result #11883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
amueller opened this issue Aug 21, 2018 · 3 comments

Comments

@amueller
Copy link
Member

See #10977 and #10978.

Well we should probably test that fitting an estimator twice gives the same
result

@raamana
Copy link
Contributor
raamana commented Aug 24, 2018

barring implementation specifics, is the following what you're looking for?

    data, labels = load_data()
    for Estimator in estimator_list: # various estimators to be checked
        est1 = Estimator()
        est1.fit(data, labels)
        est2 = Estimator()
        est2.fit(data, labels)
        if not check_identical(est1, est2):
            raise EstimatorFitError('blah')

@jnothman
Copy link
Member
jnothman commented Aug 24, 2018 via email

@jrbourbeau
Copy link
Contributor

I think this issue was resolved in #12328

@jnothman jnothman closed this as completed Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0