I am using logistic regression to predict the probability of being a bad customer. I need to transform each independent variable to make sure it has a strong linear relationship with the log-odds of my target. One variable has a upper U-shape when I plot the variable value against the log-odds. How should I transform it so I won't over-predict the lower group and under-predict the upper group?
No transformation is necessary to achieve linearity, because that isn't required. You simply have a curvilinear relationship between this variable and the outcome. So add a squared version of this variable in addition to the untransformed version. If you need a test of this variable, you would perform a simultaneous test of both terms.
It may help you to see a couple of my previous answers where this is demonstrated (in R):