August 2019
Intermediate to advanced
342 pages
9h 35m
English
We will now see a concrete example of the use of the Perceptron. We will use the scikit-learn library to create a simple spam filter based on the Perceptron. The dataset we will use to test our spam filter is based on the sms spam messages collection, available at https://archive.ics.uci.edu/ml/datasets/sms+spam+collection
The original dataset can be downloaded in CSV format; we proceeded to process the data contained in the CSV file, transforming it into numerical values to make it manageable by the Perceptron. Moreover, we have selected only the messages containing the buy and sex keywords (according to our previous description), counting for each message (be it spam or ham) the number of occurrences ...
Read now
Unlock full access