Skip to content

[BUG] predict_model showing metrics from transformed target #3447

@fmahboub

Description

@fmahboub

pycaret version checks

Issue Description

When using transform_target = True in the setup of 3.0.0, later when running predict_model
to get holdout metrics the values are for the transformed target. The subsequent data frame of individual observations from the holdout set also displays transformed predictions.

Reproducible Example

from pycaret.regression import *
import pandas as pd

df = pd.read_csv(……………)

pycaret_setup = setup(data=df, target = “…”, session_id = 1234, memory=False, preprocess = True, transform_targets=True)

model = create model(“et”)

predict_model(model)

Expected Behavior

MAE from last line and resulting df of individual predictions show results pre inverse transformation.

Actual Results

MAE is 2-3 orders of magnitude smaller than when tranform_targets=False

Installed Versions

3.0.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions