Titanic Feature Engineering & Modeling in Python
As analyzed in the previous article, there are 4 predictors that contain missing data -- Age, Fare, Cabin, and Embarked. I chose the second option given that the n/a category could have useful information for predicting survival status. One way to categorize the Age data is to manually define the number of age bins and the bin size. Here I used 9 age bins as an example. With the function defined above, it's relatively easy to test out a different number of age bins and see which ones make sense.
Jul-31-2021, 06:36:02 GMT
- Technology: