Skip to content

Classification stratificationColumn not supported for boolean column #1204

@CESARDELATORRE

Description

@CESARDELATORRE

For not balanced datasets, with stratified splitting, the data is divided in such a way that a percentage of each target column value is put in both training and test dataset.

However, the following line of code throws an error if the column 'Label' is Boolean, which is very common for binary classification.

(trainData, testData) = classification.TrainTestSplit(data, testFraction: 0.2, stratificationColumn: "Label");

It would work if the Label column would be float or other types.

I might be missing something, but why is Boolean not supported for the stratificationColumn?
Can we support it since it can be a common scenario for binary classifications?

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