Skip to content
Discussion options

You must be logged in to vote

the NA values appear after encoding because of the GroupNormalizer with softplus transformation.

when softplus encounters certain values (like zeros or very small numbers), the transformation can produce NaN or inf.

possible fixes:

  1. check for zeros in target:
print("zeros in target:", (data["target"] == 0).sum())
print("negative values:", (data["target"] < 0).sum())
print("min value:", data["target"].min())

softplus of very small/zero values can cause issues

  1. try different normalizer:
target_normalizer=GroupNormalizer(
    groups=["group_id"],
    transformation=None,  # no transformation
    # or
    transformation="log1p",  # safer than softplus for zeros
)
  1. add small epsilon to avoid…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by leonard67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants