Algorithmic Methods of Data Mining (Sc.M. in Data Science)

Academic year 2022–2023

"The success of companies like Google, Facebook, Amazon, and Netflix, not to mention Wall Street firms and industries from manufacturing and retail to healthcare, is increasingly driven by better tools for extracting meaning from very large quantities of data. 'Data Scientist' is now the hottest job title in Silicon Valley." – Tim O'Reilly

The course will develop the basic algorithmic techniques for data analysis and mining, with emphasis on massive data sets such as large network data. It will cover the main theoretical and practical aspects behind data mining.

The goal of the course is twofold. First, it will present the main theory behind the analysis of data. Second, it will be hands-on and at the end students will become familiar with various state-of-the-art tools and techniques for analyzing data.

We will cover some very basic topics necessary for handling large data, such as hashing, sorting, graphs, data structures, and databases. We will then move to more advanced data mining topics: text mining, clustering, classification, mining of frequent itemsets, graph mining, visualization.

The theoretical part will be complemented by a laboratory where students will learn how to use tools for analyzing and mining large data. We will base it on Amazon's AWS. After finishing the course, the students will have a large part of the knowledge required to pursue (independently) for an Amazon AWS Certification.

Announcements

The fifth homework is out. It is due on January 8.

The fourth homework is out. It is due on December 4.

The deadline for homework 3 is postponed to November 20.

The third homework is out. It is due on November 13.

The deadline for homework 2 is extended to October 30.

The second homework is out. It is due on October 23.

The first homework is out. It is due on October 9.

During the first two weeks, classes will take place only on Monday 19/9, Tuesday 20/9, Tuesday 27/9, and Wednesday 28/9.

Classes start on September 19.

You need to register to the class mailing list to be able to do homeworks, be part of groups, receive announcements, etc.; if you have not done it, email Aris.

Instructors

Aris Anagnostopoulos, Sapienza University of Rome.

Ioannis Chatzigiannakis, Sapienza University of Rome.

Teaching Assistants (TA)

The best way to ask any questions is through slack. If you are registered in the course mailing list and have not received an invitation from Luca, email Luca.

Daniel Jiménez (This email address is being protected from spambots. You need JavaScript enabled to view it. ), Ph.D. candidate in Data Science, Sapienza University of Rome. (LinkedIn)

Luca Maiano, (This email address is being protected from spambots. You need JavaScript enabled to view it. ) Ph.D. candidate in Data Science, Sapienza University of Rome.

Mehrdad Hassanzadeh, Data Science student, Sapienza University of Rome. (LinkedIn)

Nina Kaploukhaya (This email address is being protected from spambots. You need JavaScript enabled to view it. ), Data Science student, Sapienza University of Rome.

Valentino Sacco, (This email address is being protected from spambots. You need JavaScript enabled to view it. ) Data Science student, Sapienza University of Rome.

When and where:

Monday 14.00–16.00, Via di Castro Laurenziano 7a (Building RM018), Room 6

Wednesday 11.00–13.00, Viale Regina Elena 295 (Building RM112), Room 11.

Lab: Tuesday 15.00–19.00, Via Tiburtina 205, Room 17.

Office hours

You can use the office hours for any question regarding the class material, past or current homeworks, general questions on data mining, the meaning of life, pretty much anything. Send an email to the TAs and, if needed, to the instructors for arrangement.

Textbook and references

We will use a variety of textbooks. Whenever we can, we will try to find books that are available online. As the course progresses, we will indicate what you should read. The main books that we will use are the:

In addition, we will cover material from various other sources, which we will post online as the course proceeds.

Python resources

The main programming language that we will use in the course is Python 3.

To learn the language you can find a lot of material online. You can start from Python's documentation site: https://www.python.org/doc/.

If you would like to buy some books, you can check the

We will use several libraries in the class. For Windows users the Anaconda distribution has packaged all of them together and you can download it for free. For MAC/Linux users, all packages can be installed using the pip3 tool.

We will also use Python (Jupyter) notebooks. You can find instructions for the installation at the Jupyter web site.

If you have problems with Python installation you can obtain an ubuntu virtual machine with Python preinstalled. Contact the instructor for more information.

Syllabus

Chapters for which no book is mentioned refer to the "Mining of Massive Datasets" (see below). For the other textbooks, we refer to with the author initials: A, ZM, ZAL, MRS.

Date Topic Reading
September 19 Introduction to data science Introduction to Sapienza's Data Science
September 20 Introduction to cloud computing
Introduction to AWS, AWS Academy, S3

Laboratory 1: Introductory course to AWS Cloud and S3
Hosting a static website using Amazon S3

September 27 Introduction to AWS EC2, Unix Shell Programming

Laboratory 2a: Introductory to AWS EC2
Laboratory 2b: Introductory to Unix Shell Programming
Tutorial: Getting started with Amazon EC2 Linux instances
Introduction to Bash Shell Scripting
The Shell Scripting Tutorial

September 28 Introduction to algorithmic data mining and basic data types Introduction to data mining
October 3 Introduction to the analysis of algorithms Notes, Section 5–5.4
October 4 Introduction to Code Development Tools & Data Visualization Laboratory 3: Basic Tools & First Practice
How to Use Jupyter Notebook in 2020: A Beginner’s Tutorial
Tutorial on AWS Cloud9
Create and run your first Python project using pyCharm
Quick Tutorial on JetBrains DataLore
How to connect to your S3 buckets from your EC2 instances
AWS Command Line Interface (CLI)
October 5 Introduction to the analysis of algorithms (cont.) Notes, Section 5.5
October 10 Complexity classes Notes, Section 6
October 11 Introduction to Data Pre-processing & Data Visualization Laboratory 4: Data Pre-processing & Data Visualization
The Pandas DataFrame: Make Working With Data Delightful
October 12 Complexity classes (cont.), Distance measureas (LRU) Chapter 3.5, Notes, Sections 6.1, 6.2
October 17 Longest common subsequence, edit distance, and dynamic programming (LRU) Chapter 3.5, Notes, Section 8.1 (in class we saw in detail the DP for computing the LCS and we discussed about the DP for computing the ED, in the notes we have in detail the DP for computing the ED)
October 18 Basic computer architecture Notes, Sections 3,4
October 19 Jaccard similarity, preprocessing for text mining (LRU) Chapter 3.5, (MRS) Chapters 2.0–2.2
October 24 tf-idf, cosine similarity (LRU) Chapter 3.5, (MRS) Chapters 6.2, 6.3.1–6.3.2
October 25 Introduction to HTML
Introduction to Web Scraping
Laboratory 5: Web Scrapping
Introduction to HTML5
Structuring the web with HTML
Introduction to BeautifulSoup
Selenium with Python
October 26 Inverted indexes (MRS) Chapters 1.0–1.4, 6.3.3
October 31 Sorting Book chapters on mergesort and quicksort from the book "Introduction to Algorithms" by Cormern, Leiserson, Rivest, and Stein.
November 2 Data structures Notes, Wikipedia pages on data structures and linked lists.
November 7 Hashing (cont.), heaps, heapsort Book chapter on hashing from the book "Algorithms" by Dasgupta, Papadimitriou, and Vazirani, book chapter on heaps and heapsort from the book "Introduction to Algorithms" by Cormern, Leiserson, Rivest, and Stein.
November 8 Introduction to NLP with Python Natural Language Toolkit
Natural Language Processing with spaCy
Tutorial: How to Use the Apply Method in Pandas
Python's collections: specialized data types
Python's reduce: how to use folding
Working With Text Data using scikit-learn
November 9 MapReduce Most of the things we talked about can be found on this quick introduction
November 14 Hierarchical clustering, k-means Chapters 7.0–7.2, Slides
November 15 Introduction to Elastic Map Reduce Laboratory 7: Elastic Map Reduce
Big Data Analytics Options on AWS
Bigtable: A Distributed Storage System for Structured Data
Getting Started: Analyzing Big Data with Amazon EMR
Using EMR Notebooks
PySpark: the Python API for Spark
TF-IDF using Map Reduce
November 16 k-means++, choosing k Slides
November 21 Principal Component Analysis
November 22 Introduction to Clustering in Python Clustering in Python
K-Means in Python
Elbow Method using SciKit
November 23 Principal Component Analysis (cont.)
November 28 Queues, stacks, graphs, graph traversal Notes on graphs, book chapter on graph-traversal from the book "Introduction to Algorithms" by Cormern, Leiserson, Rivest, and Stein
November 29 Graph traversal (cont.), shortest path, minimum spanning tree Book chapter on shortest paths and on minimum spanning trees from the book "Introduction to Algorithms" by Cormern, Leiserson, Rivest, and Stein
December 5 Centrality measures, PageRank Notes on graphs, (LRU) Chapter 5.1
December 6 PageRank (cont.), Minimum cut Book chapter on minimum cut from the book "Probability and Computation" by Mitzenmacher and Upfal
December 12 Class overview and road ahead
December 13 Introduction to Graphs in Python
Twitter API
Laboratory 9: Graphs
NetworkX: Network Analysis in Python
Tweepy: An easy-to-use Python library for accessing the Twitter API
Twitter API Documentation

Homeworks

Collaboration policy (read carefully!): You can discuss with other students of the course about the projects. However, you must understand well your solutions and the final writeup must be yours and written in isolation. In addition, even though you may discuss about how you could implement an algorithm, what type of libraries to use, and so on, the final code must be yours. You may also consult the internet for information, as long as it does not reveal the solution. If a question asks you to design and implement an algorithm for a problem, it's fine if you find information about how to resolve a problem with character encoding, for example, but it is not fine if you search for the code or the algorithm for the problem you are being asked. For the projects, you can talk with other students of the course about questions on the programming language, libraries, some API issue, and so on, but both the solutions and the programming must be yours. If we find out that you have violated the policy and you have copied in any way you will automatically fail. If you have any doubts about whether something is allowed or not, ask the instructor.