Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Binary Labels in ZeroOneLoss #824

@KonstantinLukaschenko

Description

@KonstantinLukaschenko

What would you like to submit? (put an 'x' inside the bracket that applies)

  • question
  • bug report
  • feature request

Issue description

Hi @cesarsouza,

I'm using a ZeroOneLoss to evaluate a classifier with a 10-fold cross validation. During the cross validation, my holdout data often contains only 2 of n possible classes. The ZeroOneLoss assumes a binary label in such a case. When computing the loss against the predicted values, an exception is thrown if the predicted values are not binary.

For example: new ZeroOneLoss(new int[] {0, 1}).Loss(new int[] {0, 2}).

AFAICS, we need to inspect both, the expected and the actual values to determine if binary labels are used or not.

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