Skip to content

Incorrect label cast to integer #23

@paxcema

Description

@paxcema

As reported by community. Using the Titanic dataset and one of {F1 score, recall, precision}. From MindsDB:

CREATE PREDICTOR mindsdb.titanic1
FROM files                      
(SELECT * FROM titanic)              
PREDICT Survived
USING
    accuracy_functions="['f1_score']";

Triggers the following error:

ValueError: pos_label=1 is not a valid label. It should be one of ['0', '1'], raised at: /usr/local/lib/python3.8/dist-packages/mindsdb/integrations/libs/ml_exec_base.py#135

Normal accuracy, balanced accuracy or roc auc score work okay.

Note: there is an additional issue with metrics that require parameter definition, like F1 score. Support for this is at the mindsdb_sql/mindsdb level (see respective issue for this).

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