Skip to content

ovr decision_function calculation from ovo case #6416

@btdai

Description

@btdai

Dear scikit-learn developers,

I found a small bug in sklearn/svm/base.py, function decision_function, line 545. The first argument passed to multiclass._ovr_decision_function in sklearn/multiclass.py does not much with the implementation of _ovr_decision_function. The first argument from svm.decision_function is a boolean ndarray, while line 603, 604 in multiclass.py actually check if the values are 0 or 1. So the vote matrix is always zero, no matter what the first argument is from svm.decision_function.

I understand that the ovo will be replaced by ovr in version 0.18, so not sure if this function will be still valid in 0.18. Just point out just in case that, you actually wanted to check True/False, but became 0/1.

Thank you for all your effort, sklearn is very helpful!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions