LoslegenKostenlos loslegen

Visualize the normalized variables

Great work! Now you will plot the normalized and unskewed variables to see the difference in the distribution as well as the range of the values. The datamart_normalized dataset from the previous exercise is loaded.

The plt.subplot(...) call before the seaborn function call allows you to plot several subplots in one chart, you do not have to change it.

Libraries seaborn and matplotlib.pyplot have been loaded as sns and plt respectively. Feel free to explore the datamart_normalized in the console.

Diese Übung ist Teil des Kurses

Customer Segmentation in Python

Kurs anzeigen

Anleitung zur Übung

  • Plot the distribution of normalized Recency.
  • Plot the distribution of normalized Frequency.
  • Plot the distribution of normalized MonetaryValue.
  • Show the plot.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Plot recency distribution
plt.subplot(3, 1, 1); ____.distplot(____['Recency'])

# Plot frequency distribution
plt.subplot(3, 1, 2); ____.____(____['Frequency'])

# Plot monetary value distribution
plt.subplot(3, 1, 3); ____.____(____['MonetaryValue'])

# Show the plot
plt.____()
Code bearbeiten und ausführen