我正在尝试建立客户流失预测算法。我正在使用包含人口统计数据和家庭数据的数据集。一些数据包含我想用作算法一部分的字符串。如何将字符串转换为数值以提供算法?注意-这些不是简单的“男性/女性”选择,但有许多不同的答案
例如:
schooling marital status mosaic segment
Bach Degree - Likely Married - Extremely Likely Generational Soup
Bach Degree - Likely Married - Extremely Likely Sports Utility Families
Some College - Likely Single - Likely Urban Edge
Grad Degree - Likely Single - Likely Urban Survivors