探索特徵分佈
你在影片中看到,特徵 'Account_Length' 呈現常態分佈。現在讓我們使用 seaborn 的分佈圖來視覺化下列特徵的分佈:
'Day_Mins''Eve_Mins''Night_Mins''Intl_Mins'
要建立某個特徵的分佈圖,將該特徵作為引數傳入 sns.distplot()。Telco 資料集已載入為名為 telco 的 DataFrame。
本練習屬於課程
行銷分析:用 Python 預測客戶流失
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Import matplotlib and seaborn
import matplotlib.pyplot as plt
import seaborn as sns
# Visualize the distribution of 'Day_Mins'
# Display the plot
plt.show()