本篇文章主要分析网民中哪些用户群的网站广告点击率高,分析该用户群具备哪些特征。数据源是由Jose Portilla和Pierian Data为他的udemy课程(数据科学和机器学习训练营的python)创建的数据集。
特征描述
| Daily Time Spent on a Site | Time spent by the user on a site in minutes. |
| Age|Customer’s age in terms of years|
| Area Income | Average income of geographical area of consumer. |
| Daily Internet Usage | Avgerage minutes in a day consumer is on the internet. |
|Ad Topic Line|Headline of the advertisement.|
| City | City of the consumer. |
| Male | Whether or not a consumer was male. |
|Country|Country of the consumer.|
|Timestamp | Time at which user clicked on an Ad or the closed window. |
|Clicked on Ad| 0 or 1 is indicated clicking on an Ad. |
分析步骤
第一部分:数据处理
清洗数据、观察数据分布、数据类型归类、提取时间特征
第二部分:对用户群各个特征以及特征之间的联系分析对广告点击的影响
第三部分:建立逻辑回归模型
第四部分:总结
第一部分:数据处理
1、导入常用的库
df.head(10)
2、文件内容信息:
3、查看数据是否存在重复值、数据类型归类,观察数据分布情况。