Data Science Asked by Dishant Kothia on September 2, 2021
I created a XGBRegressor model with certain encoded ‘object’ dtypes in the data. Now if I want to run the model with new set of data which is freshly encoded it’s giving wrong predictions. How to ensure that the new dataset is encoded in the same way as was the train data? Or any other solution to this problem?
You can save the encoding and use them to encode the new data. Only thing to make sure is not to have new data which was not there in saved encoding. You can save them as pickle files if you are using Python.
Answered by Shantha Ekanayake on September 2, 2021
Please try this below link to get to know more about this encoding.
also, after looking at this you can understand how to save the encoding.
Answered by Shantha Ekanayake on September 2, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP