How to remove NaN value while calculating the information value of the variable?

r
classification

#1

I am currently solving one classification problem using logistic regression in R while solving it I have calculated the information value of the variable for variable selection.But I am getting NaN value for one variable. I want to know the reason and how I can remove these NaN


#2

hello @hinduja1234,

If you see the formula for IV:

The only reason I can think of NaN being generated is that the ln is being done on a negative number,but I am not sure why this is happening.

Can’t you use random forest to find out the important variables??