You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NumericalTarget constructor will happily accept a transformation without any bounds. This causes the call to target.transform() to turn the dataframe into NaNs.
frombaybe.targetsimportNumericalTarget, TargetMode, TargetTransformation# should fail, no bounds definedtarget=NumericalTarget(
name="Target_1",
mode=TargetMode.MIN,
transformation=TargetTransformation.LINEAR,
)
importpandasaspd# RuntimeWarning: invalid value encountered in divide# res = (upper - arr) / (upper - lower)print(target.transform(pd.DataFrame([1, 2, 3])))
0
0 NaN
1 NaN
2 NaN
The text was updated successfully, but these errors were encountered:
The NumericalTarget constructor will happily accept a transformation without any bounds. This causes the call to
target.transform()
to turn the dataframe into NaNs.The text was updated successfully, but these errors were encountered: