Skip to Content
Python Artificial Intelligence Projects for Beginners
book

Python Artificial Intelligence Projects for Beginners

by Dr. Joshua Eckroth
July 2018
Beginner
162 pages
3h 25m
English
Packt Publishing
Content preview from Python Artificial Intelligence Projects for Beginners

Detecting YouTube comment spam

In this section, we're going to look at a technique for detecting YouTube comment spam using bags of words and random forests. The dataset is pretty straightforward. We'll use a dataset that has about 2,000 comments from popular YouTube videos (https://archive.ics.uci.edu/ml/datasets/YouTube+Spam+Collection). The dataset is formatted in a way where each row has a comment followed by a value marked as 1 or 0 for spam or not spam.

First, we will import a single dataset. This dataset is actually split into four different files. Our set of comments comes from the PSY-Gangnam Style video:

Then we will print a few ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Artificial Intelligence with Python Cookbook

Artificial Intelligence with Python Cookbook

Ritesh Kumar, Ben Auffarth

Publisher Resources

ISBN: 9781789539462Supplemental Content