Skip to content

partial_fit should raise an error when y in each batch contains labels not present in classes_ #6203

Closed

Description

@MechCoder
X_first = rng.randn(5, 2)
ovr = OneVsRestClassifier(SGDClassifier())
ovr.partial_fit(X_first, [2, 0, 0, 1, 0], [0, 1, 2])
ovr.partial_fit(X_first, [3, 4, 4, 2, 3])

This is the problem with the base estimator as well

sgd = SGDClassifier()
sgd.partial_fit(X_first, [2, 0, 0, 1, 0], [0, 1, 2])
sgd.partial_fit(X_first, [3, 4, 4, 2, 3])

Activity

  1. added a commit that references this issue on Jan 21, 2016
  2. kaichogami commented on Jan 21, 2016

    @kaichogami
    Contributor

    I have raised an error for this in OvO. I think similar errors could be raised in OvR and possibly in the base estimators too.

  3. added a commit that references this issue on Jan 29, 2016
  4. modified the milestone: 0.19 on Sep 29, 2016
  5. jnothman commented on Jun 14, 2017

    @jnothman
    Member

    I think this can be closed, but I remain confused about whether @kaichogami's patch in 0bd565b
    was ever pulled into master.

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions