Skip to content

Binary Classification Issue #1647

@abhiyagupta

Description

@abhiyagupta

i am running binary classification report. my "target" column is binary 0,1 values, "pred_lablel" is binary 01, values and "prediction" is probabilities between 0-1
On using the code snippet below:

data_def = DataDefinition(
classification=[
BinaryClassification(
target="target",
prediction_labels="pred_label",
#labels={0: "no complication", 1: "complication"}
)
]
)

report is generated which includes -accuracy, precision, f1, recall.

but when i add predicted probabilities to add log loss and auc/roc to report, using code below:
data_def_2 = DataDefinition(
classification=[
BinaryClassification(
target="target",
prediction_labels="pred_label",
prediction_probas="prediction",
pos_label=1,
#labels={0: "no complication", 1: "complication"}
)
]
)

i get auc/roc, log loss but accuracy is wrong and precision, f1 recall values for same dataset as 0

ERROR: /home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/sklearn/metrics/_classification.py:1565: UndefinedMetricWarning:

Precision is ill-defined and being set to 0.0 due to no predicted samples. Use zero_division parameter to control this behavior.

please help correct 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