Data Mining

Academic year 2024–2025

"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 algorithms and statistical 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 use Python for downloading data and implementing various algorithms using its rich libraries and frameworks such as Spark, Storm, Giraph, and TensorFlow for mining of large-scale data.

 

Prerequisites

Students who wish to take this course should be familiar with Python programming.

 

Announcements

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

The third homework is out. It is due on December 1.

The second homework is out. It is due on November 17.

The first homework is out. It is due on November 3.

Make sure to register in the class mailing list. Email Aris to do so.

The first day of class is September 30.

 

 

Instructor

Aris Anagnostopoulos, Sapienza University of Rome.

Teaching Assistant (TA)

This email address is being protected from spambots. You need JavaScript enabled to view it. , Sapienza University of Rome.

 

When and where:

Monday 16.00–19.00, Room A5–A6

Wednesday 14.00–17.00, Room A5–A6

 

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 Gianluca or, if needed, to Aris for arrangement.

 

Textbook and references

The main textbook is the "Mining of Massive Datasets," by J. Leskovec, A. Rajaraman, and J. D. Ullman. The printed version has been updated and you can download the latest version (currently 3) from the book's web site.

In addition, we will also use some chapters from some other textbooks, all available online:

The following book is not obligatory for the class, but is a vary useful book for the topic of feature engineering

For neural networks and GNNs, a nice book is

Finally, we will cover material from various 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/.

We will use several libraries in the class. The Anaconda distribution has packaged all of them together and you can download it for free.

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

 

Examination format

The evaluation will consist of two parts:

  • 4 sets of homeworks
  • A final project. Details will be given during the course

Late policy: Every homework must be returned by the due date. Homeworks that are late will lose 10% of the grade if they are up to 1 day (24h) late, 20% if they are 2 days late, 30% if they are 3 days late, and they will receive no credit if they are late for more than 3 days. However, you have a bonus of 3 late days, which you can distribute as you wish among all the homeworks. The homeworks will be discussed and graded at the end, during the final exam.

In addition, we will take into account participation during class.

 

Syllabus

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

Date Topic Reading
September 30 Introduction to data mining and data types, a crash course in probability LRU Chapters 1.1, 1.3
Introduction to data mining, A crash course on discrete probability
Check the background probability chapters below
October 2 A crash course in probability (cont.)
October 7 Drash course in probability (cont.), similarity and distance measures Book chapter on quicksort from the book of Mitzenmacher and Upfal on Probability and Computing
Chapter 3.5
October 14 Preprocessing for text mining, the vector-space model, TF-IDF scoring, Inverted indexes MRS Chapters 1.0–1.4, 2.0–2.2, 6.2, 7.1.0
October 16 Brief recap of Hadoop, MapReduce, and Spark; construction of large indexes. LRU Chapters 3.4, 2.0–2.4, Quick introduction to MapReduce
October 21 Lab on Apache SPARK PySpark tutorial and slides by Fanilo Andrianasolo
October 23 Shingles, minwise hashing LRU Chapters 3.0–3.3
October 28 LSH, Introduction to clustering, hierarchical clustering Chapters 3.4, 7.0–7.1.2, 7.2.
October 30 k-means Chapters 7.3.0–7.3.2. Chapter on k-means of the book of Christopher M. Bishop
November 4 k-means++ Paper by D. Arthur and S. Vassilvitskii
November 6 Introduction to generative models, soft clustering, and expectation–maximization Notes
November 11 Principal component analysis, part 1 Notes
November 13 Principal component analysis, part 2 Notes
November 18 Principal component analysis, part 3 Notes
November 20 Some info on feature engineering
November 25 Embeddings and Word2Vec Original paper on Word2Vec
November 27 PageRank and Personalized PageRank LRU Chapters 5.1, 5.3
December 2 Node embeddings Papers on DeepWalk and node2vec
December 4 Graph neural networks, recommender systems Book chapter on GNNs from the book of Drori The Science of Deep Learning,
Slides on recommender systems

 

Homeworks

Check the "Examination format" section below for information about collaborating, being late, and so on.

Handing in: You must hand in the homeworks by the due date and time by an email to the TA that will contain as attachment (not links!) a .zip or .tar.gz file with all your answers and subject

[Data Mining class] Homework #

where # is the homework number. After you submit, you will receive an acknowledgement email that your homework has been received and at what date and time. If you have not received an acknowledgement email within 2 days after the deadline then contact Gianluca.

The solutions for the theoretical exercises must contain your answers either typed up or hand written clearly and scanned.

The solutions for the programming assignments must contain the source code, instructions to run it, and the output generated (to the screen or to files).


We will not post the solutions online, but we will present them in class.

 

Notes, slides, and other material

Book chapters and notes:

Background reading on combinatorics, basic probability, random variables, and basic probability distributions.

 

 

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.

The same applies for generative AI tools, such as ChatGPT. These can be useful tools in your work and there are some homework questions in which we ask you explicitly to use them. However, the use of such tools when it is not explicitly allowed will be treated as plagiarism and is strictly prohibited.