'Getting NaNs in Power Transform inverse transformation

When I perform the inverse transform operation, I get some NaN values back.

Steps I took:

  1. Power transformed each feature column and saved it in a dictionary:
{col1: transformer,
col2: transformer2,
...,
yCol: transformerY
}
  1. After training the model and getting its predictions, I apply the inverse transform from transformerY and receive some NaNs. Why is this happening and how do I mitigate this?

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source