0
$\begingroup$

I have calculated the Weight of evidence of two high cardinality variables(Postal_Code_L and Managing_Sales_Office_Nbr) using the instances in a training set in Python.

The problem is that now I want to replace the values of these high cardinality variables in instances of the test set with their WOE. How can I do this?

First 20 instances of the high cardinality variables and their WOE. For instances in the test set, the WOE is missing and should be replaced with the WOE calculated using the instances of the training set:

image

I already asked this question on Stack Overflow but I didn't get an answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.