Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经使用标签编码器来转换数据集的“A”列。假设新列被称为“B”。现在我使用回归算法来预测“B”列。但我需要一个预测类仅以“A”形式。我正在使用反向变换函数这样做,但是在对预测数据使用反向变换函数后它会给出错误。
当我们适合标签编码器时,会创建一个对象。所以可以使用object_name.inverse_transform(prediction_test)。