March 2019
Beginner to intermediate
464 pages
10h 57m
English
We are almost ready to start building and training machine learning models to predict customer responses or engagements. There are a few things to clean up in our data. Take a look at the following code:
all_features = continuous_features + categorical_featuresresponse = 'Engaged'sample_df = df[all_features + [response]]sample_df.columns = [x.replace(' ', '.') for x in sample_df.columns]all_features = [x.replace(' ', '.') for x in all_features]
As you can see from this code, we are creating a new DataFrame sample_df, which contains all the features, all_features, and the response variable, response. Then, we are cleaning up the column and feature names by replacing all the spaces in the names with dots. After these ...
Read now
Unlock full access