Aan de slagGa gratis aan de slag

Engineering a new column

Leveraging domain knowledge to engineer new features is an essential part of modeling. This quote from Andrew Ng summarizes the importance of feature engineering:

Coming up with features is difficult, time-consuming, requires expert knowledge. "Applied machine learning" is basically feature engineering.

Your job in this exercise is to create a new feature that contains information about the average length of night calls made by customers.

Deze oefening maakt deel uit van de cursus

Marketing Analytics: Predicting Customer Churn in Python

Cursus bekijken

Oefeninstructies

  • Create a new feature - 'Avg_Night_Calls' - that is the result of dividing 'Night_Mins by 'Night_Calls'.
  • Print the first five rows of this new feature.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Create the new feature
telco['____'] = ____

# Print the first five rows of 'Avg_Night_Calls'
print(____)
Code bewerken en uitvoeren