初学者垃圾邮件检测

这是一个使用Python机器学习实现的垃圾邮件检测项目。作者在完成Coursera的'Python应用文本挖掘'课程后创建了它。博客中详细解释了代码的每个步骤,并提供了GitHub链接供读者获取完整代码。
摘要由CSDN通过智能技术生成

This is a small project in python using machine learning to detect whether a given text is spam or ham(not spam). I made this project after completing the course of “Applied Text Mining in Python” by the University of Michigan on Coursera, the link to the course is given at the end of the blog. Here, I’ll try to explain each step in my code and if you want the whole code, the GitHub link too will be available at the end.

这是python中的一个小项目,使用机器学习来检测给定的文本是垃圾邮件还是垃圾邮件(不是垃圾邮件)。 在完成密西根大学Coursera的“ Python中的应用文本挖掘”课程之后,我完成了这个项目,该课程的链接在博客的末尾给出。 在这里,我将尝试解释代码中的每个步骤,如果您需要整个代码,那么GitHub链接也将在最后可用。

I used my local machine for this project and the specification is mentioned below. Though its a very small project so you wouldn't need a lot of computation power for it.

我将本地计算机用于此项目,并且在下面提到了规范。 尽管这是一个很小的项目,所以您不需要很多计算能力。

规范 (Specification)

Name: Acer Predator Helios 300 (2019)

名称:宏cer捕食者Helios 300(2019)

Graphics Card: NVIDIA GeForce GTX 1660 Ti

显卡:NVIDIA GeForce GTX 1660 Ti

Processor Name: Intel Core i7–9750H

处理器名称:Intel Core i7–9750H

RAM: 16 GB

内存:16 GB

导入库 (Importing The Libraries)

I used Pandas and NumPy for data manipulation, matplotlib for graph plotting, and sklearn for preprocessing, model creation and model evaluation. I’ll explain what each library is doing when I use them in my code moving forward.

我使用Pandas和NumPy进行数据操作,使用matplotlib进行图形绘制,并使用sklearn进行预处理,模型创建和模型评估。 我将解释在以后的代码中使用它们时每个库的功能。

P.S. — %matplotlib notebook, is a jupyter notebook magic function.

PS —%matplotlib笔记本,是jupyter笔记本的魔术功能。

分析数据 (Analysing The Data)

Using the df.head(), df being the Pandas DataFrame o

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值