====== Data Mining A.A. 2023/24 ====== ===== DM1 - Data Mining: Foundations (6 CFU) ===== Instructors: * **Dino Pedreschi** * KDDLab, Università di Pisa * [[http://www-kdd.isti.cnr.it]] * [[dino.pedreschi@unipi.it]] * **Riccardo Guidotti** * KDDLab, Università di Pisa * [[https://kdd.isti.cnr.it/people/guidotti-riccardo]] * [[riccardo.guidotti@di.unipi.it]] Teaching Assistant * **Andrea Fedele** * KDDLab, Università di Pisa * [[https://www.linkedin.com/in/andrea-fedele/?originalSubdomain=it]] * [[andrea.fedele@phd.unipi.it]] ===== DM2 - Data Mining: Advanced Topics and Applications (6 CFU) ===== Instructors: * **Riccardo Guidotti** * KDDLab, Università di Pisa * [[https://kdd.isti.cnr.it/people/guidotti-riccardo]] * [[riccardo.guidotti@di.unipi.it]] Teaching Assistant * **Andrea Fedele** * KDDLab, Università di Pisa * [[https://www.linkedin.com/in/andrea-fedele/?originalSubdomain=it]] * [[andrea.fedele@phd.unipi.it]] * Meeting: https://calendly.com/andreafedele/ ====== News ====== * **[19.01.2024]** DM2 Lectures will start on Mon 19/02, only for that lecture the time will be 14-16 instead of 9-11. * [13.10.2023] To schedule meeting with the Teaching Assistant you can use: https://calendly.com/andreafedele/ * [20.09.2023] Recordings of the lectures can be found on the web pages of the course for the years 2020/2021 and 2021/2022 (see links at the bottom of this page) * [20.09.2023] Thursday 21 September there will be no lecture. * [11.09.2023] Lectures will start on Monday 18 September 2023 at 11.00 room C1. * [11.09.2023] Lectures will be in presence only. Registrations of the lectures of past years can be found at the bottom of this web page. * [11.09.2023] Project Groups [[https://docs.google.com/spreadsheets/d/10R5AcqdlXsqTAxSys6zyqArvdytq4HH6Ik8Uy-NHkQ4/edit?usp=sharing|link]] * [11.09.2023] MS Teams [[https://teams.microsoft.com/l/team/19%3a7uEgK_aekrBFuOsbREccAa-tfqeSwvfBemfK_lG6HA01%40thread.tacv2/conversations?groupId=84cc4fec-41fc-4208-a9d4-a02675216d22&tenantId=c7456b31-a220-47f5-be52-473828670aa1|link]] ====== Learning Goals ====== * DM1 * Fundamental concepts of data knowledge and discovery. * Data understanding * Data preparation * Clustering * Classification * Pattern Mining and Association Rules * Sequential Pattern Mining * DM2 * Outlier Detection * Dimensionality Reduction * Regression * Advanced Classification and Regression * Time Series Analysis * Transactional Clustering * Explainability ====== Hours and Rooms ====== ===== DM1 ===== **Classes** ^ Day of Week ^ Hour ^ Room ^ | Monday | 11:00 - 13:00 | C1 | | Wednesday | 11:00 - 13:00 | C1 | **Office hours - Ricevimento:** * Prof. Pedreschi * Monday 16:00 - 18:00 * Online * Prof. Guidotti * Tuesday 16:00 - 18:00 or Appointment by email * Room 363 Dept. of Computer Science or MS Teams ===== DM 2 ===== **Classes** ^ Day of Week ^ Hour ^ Room ^ | Monday | 09:00 - 11:00 | C | | Wednesday | 11:00 - 13:00 | C | **Office Hours - Ricevimento:** * Tuesday 15.00-17.00 or Appointment by email * Room 363 Dept. of Computer Science or MS Teams ====== Learning Material -- Materiale didattico ====== ===== Textbook -- Libro di Testo ===== * Pang-Ning Tan, Michael Steinbach, Vipin Kumar. **Introduction to Data Mining**. Addison Wesley, ISBN 0-321-32136-7, 2006 * [[http://www-users.cs.umn.edu/~kumar/dmbook/index.php]] * I capitoli 3, 5, 7 sono disponibili sul sito del publisher. -- Chapters 3,5 and 7 are also available at the publisher's Web site. * Berthold, M.R., Borgelt, C., Höppner, F., Klawonn, F. **GUIDE TO INTELLIGENT DATA ANALYSIS.** Springer Verlag, 1st Edition., 2010. ISBN 978-1-84882-259-7 * Laura Igual et al.** Introduction to Data Science: A Python Approach to Concepts, Techniques and Applications**. 1st ed. 2017 Edition. * Jake VanderPlas. **[[http://shop.oreilly.com/product/0636920034919.do| Python Data Science Handbook: Essential Tools for Working with Data.]]** 1st Edition. ===== Slides ===== * The slides used in the course will be inserted in the calendar after each class. Most of them are part of the slides provided by the textbook's authors [[http://www-users.cs.umn.edu/~kumar/dmbook/index.php#item4|Slides per "Introduction to Data Mining"]]. ===== Software===== * Python - Anaconda (>3.7): Anaconda is the leading open data science platform powered by Python. [[https://www.anaconda.com/distribution/| Download page]] (the following libraries are already included) * Scikit-learn: python library with tools for data mining and data analysis [[http://scikit-learn.org/stable/ | Documentation page]] * Pandas: pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. [[http://pandas.pydata.org/ | Documentation page]] Other softwares for Data Mining * [[http://www.knime.org | KNIME ]] The Konstanz Information Miner. [[http://www.knime.org/download-desktop| Download page ]] * [[http://www.cs.waikato.ac.nz/ml/weka/ | WEKA ]] Data Mining Software in JAVA. University of Waikato, New Zealand [[http://www.cs.waikato.ac.nz/ml/weka/ | Download page ]] * Didactic Data Mining [[http://matlaspisa.isti.cnr.it:5055/Help| DDMv1]], [[https://kdd.isti.cnr.it/ddm/#/| DDMv2]] ====== Class Calendar (2023/2024) ====== ===== First Semester (DM1 - Data Mining: Foundations) ===== ^ ^ Day ^ Time ^ Room ^ Topic ^ Material ^ Lecturer ^ |01.| 18.09.2023 | 11-13 |C1| Overview, Introduction | {{ :dm:00_dm1_introduction_2023_24.pdf | Intro}} | Pedreschi| | | 20.09.2023 | 11-13 | | No Lecture | | | |02.| 25.09.2023 | 11-13 |C1| Lab. Introduction to Python | {{ :dm:dm1_lab01_python_basics.zip | Python Basic}} | Guidotti| |03.| 27.09.2023 | 11-13 |C1| Lab. Data Understanding | {{ :dm:dm1_lab02_data_understanding.zip | Data Understanding}} | Guidotti| |04.| 02.10.2023 | 11-13 |C1| Data Understanding | {{ :dm:01_dm1_data_understanding_2023_24.pdf | Data Understanding}} | Guidotti| |05.| 04.10.2023 | 11-13 |C1| Data Understanding & Preparation | {{ :dm:01_dm1_data_understanding_2023_24.pdf | Data Understanding}}, {{ :dm:02_dm1_data_preparation_2023_24.pdf | Data Preparation}} | Pedreschi| |06.| 09.10.2023 | 11-13 |C1| Data Preparation & Data Similarity | {{ :dm:02_dm1_data_preparation_2023_24.pdf | Data Preparation}}, {{ :dm:03_dm1_data_similarity_2023_24.pdf | Data Similarity}} | Pedreschi| |07.| 11.10.2023 | 11-13 |C1| Data Similarity & Lab. Data Understanding | {{ :dm:03_dm1_data_similarity_2023_24.pdf | Data Similarity}}, {{ :dm:dm1_lab02_data_understanding.zip | Data Understanding}} | Pedreschi| |08.| 16.10.2023 | 11-13 |C1| Introduction to Clustering, K-Means | {{ :dm:04_dm1_clustering_intro_2023_24.pdf | Intro_Clustering}}, {{:dm:05_dm1_kmeans_2023_24.pdf | K-Means }} | Pedreschi| |09.| 18.10.2023 | 11-13 |C1| Clustering Validation, Hierarchical Clustering | {{ :dm:04_dm1_clustering_intro_2023_24.pdf | Intro_Clustering}}, {{ :dm:06_dm1_hierarchical_clustering_2023_24.pdf | Hierarchical}} | Pedreschi| |10.| 23.10.2023 | 11-13 |C1| Density-based Clustering | {{ :dm:07_dm1_density_based_2023_24.pdf | Density-based Clustering}} | Pedreschi| |11.| 25.10.2023 | 11-13 |C1| Lab. Clustering | {{ :dm:dm1_lab03_clustering.zip | Clustering}}| Guidotti| |12.| 30.10.2023 | 11-13 |C1| Ex. Clustering | {{ :dm:ex1_dm1_clustering_2023_24.pdf | ExClustering}}| Guidotti| | | 01.11.2023 | 11-13 | | No Lecture | | | |13.| 06.11.2023 | 11-13 |C1| Intro Classification, kNN[[https://unipiit.sharepoint.com/sites/a__td_61280/Shared%20Documents/General/Recordings/Lecture%2006_11_2023-20231106_110052-Registrazione%20della%20riunione.mp4?web=1|(video)]] | {{ :dm:08_dm1_classification_intro_2023_24.pdf | Intro_Classification}}, {{ :dm:09_dm1_knn_2023_24.pdf | kNN}}| Guidotti| |14.| 08.11.2023 | 11-13 |C1| Naive Bayes, Exercises | {{ :dm:10_dm1_naive_bayes_2023_24.pdf | Naive Bayes}} | Guidotti| |15.| 13.11.2023 | 11-13 |C1| Model Evaluation | {{ :dm:11_dm1_classification_eval_2023_24.pdf | Model Evaluation}} | Guidotti| |16.| 15.11.2023 | 11-13 |C1| Model Evaluation Exercises & Lab | {{ :dm:dm1_lab04_classification_regression.zip | Classification}} | Guidotti| | | 20.11.2023 | 11-13 | | No Lecture | | | |17.| 22.11.2023 | 11-13 |C1| Decision Tree Classifier | {{ :dm:12_dm1_decision_trees_2023_24.pdf | Decision Tree}} | Pedreschi| |18.| 27.11.2023 | 11-13 |C1| Decision Tree Classifier | {{ :dm:12_dm1_decision_trees_2023_24.pdf | Decision Tree}} | Pedreschi| |19.| 29.11.2023 | 11-13 |C1| Exercises and Lab. Decision Tree Classifier | {{ :dm:dm1_lab04_classification.zip | Decision Tree}} | Guidotti| |20.| 04.12.2023 | 11-13 |C1| Decision Tree Classifier, Exercises and Lab | {{ :dm:12_dm1_decision_trees_2023_24.pdf | Decision Tree}} | Pedreschi| |21.| 06.12.2023 | 11-13 |C1| Intro Regression & Lab. Regression | {{ :dm:12_dm1_linear_regression_2023_24.pdf | Regression}}, {{ :dm:dm1_lab05_regression.zip | Regression}} | Guidotti| |22.| 11.12.2023 | 11-13 |C1| Into Pattern Mining and Apriori | {{ :dm:13_dm1_pattern_mining_2023_24.pdf | Pattern Mining}} | Pedreschi| |23.| 13.12.2023 | 16-18 |C1| Apriori & Lab. Pattern Mining | {{ :dm:13_dm1_pattern_mining_2023_24.pdf | Pattern Mining}}, {{ :dm:dm1_lab06_pattern_mining.zip | Pattern Mining}} | Pedreschi| |24.| 18.12.2023 | 11-13 |C| FP-Growth and Exercises | {{ :dm:13_dm1_pattern_mining_2023_24.pdf | Pattern Mining}} | Guidotti| ===== Second Semester (DM2 - Data Mining: Advanced Topics and Applications) ===== ^ ^ Day ^ Time ^ Room ^ Topic ^ Material ^ Lecturer ^ |01.| 19.02.2024 | 14-16 |C| Overview, Rule-based Models | {{ :dm:14_dm2_intro_2023_24.pdf | Introduction}}, {{ :dm:dm2_project_guidelines_23_24.pdf | Guidelines}}, {{ :dm:15_dm2_rule_based_classifier_2023_24.pdf | Rule-based Models }} | Guidotti| | | 21.02.2024 | | | No Lecture | | | | | 26.02.2024 | | | No Lecture | | | |02.| 19.02.2024 | 11-13 |C| Sequential Pattern Mining | {{ :dm:16_dm2_sequential_pattern_mining_2023_24.pdf | Sequential Pattern Mining}}, {{ :dm:GSP.zip | GSP}} | Guidotti| |03.| 04.03.2024 | 9-11 |C| Sequential Pattern Mining | {{ :dm:16_dm2_sequential_pattern_mining_2023_24.pdf | Sequential Pattern Mining}}, {{ :dm:GSP.zip | GSP}} | Guidotti| |04.| 06.03.2024 | 11-13 |C| Transactional Clustering | {{ :dm:17_dm2_transactional_clustering_2023_24.pdf | Transactional Clustering}} | Guidotti| |05.| 11.03.2024 | 9-11 |C| Time Series Similarity | {{ :dm:18_dm2_time_series_similarity_2023_24.pdf | Time Series Similarity}}, {{ :dm:dm2_lab00_spotify.zip | TS_Load}}, {{ :dm:dm2_lab01_dist_transf.zip | TS_Similarity}} | Guidotti| |06.| 13.03.2024 | 11-13 |C| Time Series Approximation | {{ :dm:19_dm2_time_series_clustering_approximation_2023_24.pdf | Time Series Clustering}}, {{ :dm:dm2_lab02_approx_clust.zip | TS_Approx_Clustering}} | Guidotti| |07.| 18.03.2024 | 9-11 |C| Time Series Clustering & Motifs| {{ :dm:20_dm2_time_series_matrix_profile_2023_24.pdf | Time Series Motifs}}, {{ :dm:dm2_lab03_motifs.zip | TS_Motifs}} | Guidotti| |08.| 20.03.2024 | 11-13 |C| Time Series Classification | {{ :dm:21_dm2_time_series_classification_2023_24.pdf | Time Series Classification}}, {{ :dm:dm2_lab04_classification.zip | TS_Classification}} | Guidotti| |09.| 25.03.2024 | 9-11 |C| Imbalanced Learning | {{ :dm:22_dm2_imbalanced_learning_2023_24.pdf | Imbalanced Learning}}, {{ :dm:dm2_lab05_imbalance.zip |ImbLearn}} | Guidotti| |10.| 27.03.2024 | 11-13 |C| Dimensionality Reduction | {{ :dm:23_dm2_dimred_2023_24.pdf | Dimensionality Reduction}}, {{ :dm:dm2_lab06_dimred.zip |DimRed}} | Guidotti| |11.| 03.04.2024 | 11-13 |C| Outlier Detection | {{ :dm:24_dm2_anomaly_detection_2023_24.pdf | Outlier Detection}} | Guidotti| |12.| 08.04.2024 | 9-11 |C| Outlier Detection | {{ :dm:24_dm2_anomaly_detection_2023_24.pdf | Outlier Detection}}, {{ :dm:dm2_lab07_outlier_det.zip | OutlierDetection}} | Guidotti| |13.| 10.04.2024 | 11-13 |C| Outlier Detection | {{ :dm:24_dm2_anomaly_detection_2023_24.pdf | Outlier Detection}}, {{ :dm:dm2_lab07_outlier_det.zip | OutlierDetection}} | Guidotti| |14.| 15.04.2024 | 14-16 |C| Gradient Descend, MLE | {{ :dm:25_dm2_gradient_descent_2023_24.pdf | GD}}, {{ :dm:26_dm2_maximum_likelihood_estimation_2023_24.pdf | MLE}} | Guidotti| |15.| 17.04.2024 | 11-13 |C| Odds, LogOdds, Logistic Regression| {{ :dm:27_dm2_odds_2023_24.pdf | Odds}}, {{ :dm:28_dm2_logistic_regression_2023_24.pdf | LogReg}}, {{ :dm:dm2_lab08_logistic_reg.zip | LogReg}} | Guidotti| |16.| 22.04.2024 | 14-16 |C| Support Vector Machine | {{ :dm:29_dm2_svm_2023_24.pdf | SVM}}, {{ :dm:dm2_lab09_svm.zip | LabSVM}} | Guidotti| |17.| 14.04.2024 | 11-13 |C| Perceptron, Neural Networks| {{ :dm:30_dm2_perceptron_2023_24.pdf | Perceptron}} | Guidotti| ====== Exams ====== ** How and Where: ** The exam will take place in oral mode only at the teacher's office or classroom previously designated. The exam will be held online on the 420AA Data Mining course channel only at the request of the student in accordance with current legislation. ** When: ** The dates relating to the start of the three exams are/will be published on the online platform https://esami.unipi.it/. Within each session, we will identify dates and slots in order to distribute the various orals. The dates and slots to take the exam will be published on the course page by the end of May. Each student must also register on https://esami.unipi.it/. The examination can only be carried out after the delivery of the project. The project must be delivered one week before when you want to take the exam. Group oral discussions will be preferred in respect of the project groups in order to parallelize any discussion on the project. It is not mandatory to take the oral exam together with the other members of the group. In the event that the oral exam is not passed, it will not be possible to take it for 20 days. If the project is not considered sufficient, it must be carried out again on a new dataset or a very updated version of the current one. ** What: ** The oral test will evaluate the practical understanding of the algorithms. The exam will evaluate three aspects. - Understanding of the theoretical aspects of the topics addressed during the course. The student may be required to write on formulas or pseudocode. During the explanations, the student can use pen and paper. - Understanding of the algorithms illustrated during the course and their practical implementation. You will be asked to perform one or more simple exercises. The text will be shown on the teacher's screen and / or copied to Miro. The student will have to use pen and paper (if online by Miro https://miro.com/ to show how the exercise is solved. - Discussion of the project with questions from the teacher regarding unclear aspects, questionable steps or choices. ** Final Mark: ** for 12-credit exam, the final mark will be obtained as the average mark of DM1 and DM2. ===== Exam Booking Periods ===== * Exam portal link: [[https://esami.unipi.it/|here]] * 1st Appello: from 09/01/2024 to 31/12/2024 * 2nd Appello: from 01/02/2024 to 17/02/2024 * 3rd Appello: * 4th Appello: * 5th Appello: * 6th Appello: ===== Exam Booking Agenda ===== * 1st Appello - DM1: https://agende.unipi.it/yra-ief-dmo, DM2: https://agende.unipi.it/rnm-urj-wsu * 2nd Appello - DM1: https://agende.unipi.it/yra-ief-dmo, DM2: https://agende.unipi.it/rnm-urj-wsu * 3rd Appello: - DM1 & DM2: from 04/06/2024 to 07/06/2024 (deliver project by 29/05/2024) * 4th Appello: - DM1 & DM2: from 02/07/2024 to 05/07/2024 (deliver project by 25/06/2024) * 5th Appello: - DM1 & DM2: from 19/07/2024 to 24/07/2024 (deliver project by 12/06/2024) * 6th Appello: **Do not forget to make the evaluation of the course!!!** ===== Exam DM1 ====== The exam is composed of two parts: * An **oral exam**, that includes: (1) discussing the project report; (2) discussing topics presented during the classes, including the theory and practical exercises. * A **project**, that consists in exercises requiring the use of data mining tools for analysis of data. Exercises include: data understanding, clustering analysis, pattern mining, and classification (guidelines will be provided for more details). The project has to be performed by min 2, max 3 people. It has to be performed by using Python or any other data mining software. The results of the different tasks must be reported in a unique paper. The total length of this paper must be max 20 pages of text including figures. The paper must be emailed to [[andrea.fedele@phd.unipi.it]] and [[riccardo.guidotti@unipi.it]]. Please, use “[DM1 2023-2024] Project” in the subject. * **Dataset** - Assigned: 25/09/2023 - MidTerm Submission: 15/11/2023 (+0.5) (half project required, i.e., Data Understanding & Preparation and Clustering) - Final Submission: 31/12/2023 (+0.5) one week before the oral exam (complete project required). - Dataset: {{ :dm:std.zip | STD}} ** DM1 Project Guidelines ** See {{ :dm:dm1_project_guidelines_23_24.pdf | Project Guidelines}}. ===== Exam DM2 ====== The exam is composed of two parts: * An **oral exam**, that includes: (1) discussing the project report; (2) discussing topics presented during the classes, including the theory and practical exercises. * A **project**, that consists in exercises requiring the use of data mining tools for analysis of data. Exercises include: imbalanced learning, dimensionality reduction, outlier detection, advanced classification/regression methods, time series analysis/clustering/classification (guidelines will be provided for more details). The project has to be performed by min 1, max 3 people. It has to be performed by using Python or any other data mining software. The results of the different tasks must be reported in a unique paper. The total length of this paper must be max 30 pages of text including figures. The paper must be emailed to [[andrea.fedele@phd.unipi.it]] and [[riccardo.guidotti@unipi.it]]. Please, use “[DM2 2023-2024] Project” in the subject. * **Dataset** - Assigned: 19/02/2024 - MidTerm Submission: 30/04/2024 (Modules 1 and 2 (for TS classification non DL-based models) - Final Submission: one week before the oral exam (complete project required, also with DL-based models for TS classification). - Dataset: [[https://unipiit-my.sharepoint.com/:u:/g/personal/a_fedele7_studenti_unipi_it/EUSyNv8ahD9FrBZ6fiF3gvABcYVLpbo1biIyOGy8AmcO5g?e=ziQtEc|STD]] ** DM2 Project Guidelines ** See {{ :dm:dm2_project_guidelines_23_24.pdf | Project Guidelines}}. ===== Past Exams ===== * Past exams texts can be found in old pages of the course. Please do not consider these exercises as a unique way of testing your knowledge. Exercises can be changed and updated every year and will be published together with the slides of the lectures. ===== Reading About the "Data Scientist" Job ===== ** ... a new kind of professional has emerged, the data scientist, who combines the skills of software programmer, statistician and storyteller/artist to extract the nuggets of gold hidden under mountains of data. Hal Varian, Google’s chief economist, predicts that the job of statistician will become the "sexiest" around. Data, he explains, are widely available; what is scarce is the ability to extract wisdom from them. ** //Data, data everywhere. The Economist, Special Report on Big Data, Feb. 2010.// * Data, data everywhere. The Economist, Feb. 2010 {{:dm:economist--010.pdf|download}} * Data scientist: The hot new gig in tech, CNN & Fortune, Sept. 2011 [[http://tech.fortune.cnn.com/2011/09/06/data-scientist-the-hot-new-gig-in-tech/|link]] * Welcome to the yotta world. The Economist, Sept. 2011 {{:dm:economist-2012-dm.pdf|download}} * Data Scientist: The Sexiest Job of the 21st Century. Harvard Business Review, Sept 2012 [[http://hbr.org/2012/10/data-scientist-the-sexiest-job-of-the-21st-century/ar/1|link]] * Il futuro è già scritto in Big Data. Il SOle 24 Ore, Sept 2012 [[http://www.ilsole24ore.com/art/tecnologie/2012-09-21/futuro-scritto-data-155044.shtml?uuid=AbOQCOhG|link]] * Special issue of Crossroads - The ACM Magazine for Students - on Big Data Analytics {{:dm:crossroadsxrds2012fall-dl.pdf|download}} * Peter Sondergaard, Gartner, Says Big Data Creates Big Jobs. Oct 22, 2012: [[https://www.youtube.com/watch?v=mXLy3nkXQVM|YouTube video]] * Towards Effective Decision-Making Through Data Visualization: Six World-Class Enterprises Show The Way. White paper at FusionCharts.com. [[http://www.fusioncharts.com/whitepapers/downloads/Towards-Effective-Decision-Making-Through-Data-Visualization-Six-World-Class-Enterprises-Show-The-Way.pdf|download]] ====== Previous years ===== * [[dm.2022-23ds]] * [[dm.2021-22ds]] * [[dm.2020-21]] * [[dm.2019-20]] * [[dm.2018-19]] * [[dm.2017-18]] * [[dm.2016-17]] * [[dm.2015-16]] * [[dm.2014-15]] * [[dm.2013-14]] * [[dm.2012-13]] * [[dm.2011-12]]