====== Data Mining A.A. 2021/22 ====== ===== DM1 - Data Mining: Foundations (6 CFU) ===== Instructors: * **Dino Pedreschi** * KDDLab, Università di Pisa * [[http://www-kdd.isti.cnr.it]] * [[dino.pedreschi@unipi.it]] * **Mirco Nanni** * KDDLab, ISTI - CNR, Pisa * [[http://www-kdd.isti.cnr.it]] * [[mirco.nanni@isti.cnr.it]] Teaching Assistant * **Salvatore Citraro** * KDDLab, Università di Pisa * [[http://www-kdd.isti.cnr.it]] * [[salvatore.citraro@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 * **Francesco Spinnato** * KDDLab, Scuola Normale Superiore * [[https://kdd.isti.cnr.it/people/spinnato-francesco]] * [[francesco.spinnato@sns.it]] ====== News ====== * [24.02.2022] Project Groups [[https://docs.google.com/spreadsheets/d/1SuU8YLHKQcGvg4itG7xkpYKpyTJ77_bHQIVtsRN4_Hg/edit|link]] * [28.04.2022] The exams are held "in person", compatibly with the availability of adequate spaces. For particular categories of students (students with disabilities and international or Erasmus students), the exams ensured remotely upon request presented by the student when completing the registration form for the exam or, after the closing of the registration deadline, by filling in the appropriate form available at the following link: http://su.unipi.it/DichiarazioneEsameRemoto. * [05.05.2022] Rules for DM2 exam available {{ :dm:dm2_exam_rules.pdf | here}}. * [26.05.2022] It is now possible to book slots for oral exams [[https://agende.unipi.it/pyb-lbo-ksq|here]]. The exams will be in Aula X1. * **[29.08.2022]** The exams for the September session will be held in Sala Polifunzionale 308 in the Department of Computer Science. ====== Learning Goals ====== * DM1 * Fundamental concepts of data knowledge and discovery. * Data understanding * Data preparation * Clustering * Classification * Pattern Mining and Association Rules * Clustering * DM2 * Outlier Detection * Dimensionality Reduction * Regression * Advanced Classification * Time Series Analysis * Sequential Pattern Mining * Advanced Clustering * Transactional Clustering * Ethical Issues ====== Hours and Rooms ====== ===== DM1 ===== **Classes** ^ Day of Week ^ Hour ^ Room ^ | Monday | 11:00 - 13:00 | Aula C / [[https://teams.microsoft.com/l/team/19%3aRQK4eHK7Z7ogIuZu84k30riyA7YW6fCTF7f54PblHzc1%40thread.tacv2/conversations?groupId=c101108b-7634-4982-9d61-b38deee14681&tenantId=c7456b31-a220-47f5-be52-473828670aa1|MS Teams]] | | Thursday | 11:00 - 13:00 | Aula A1 / [[https://teams.microsoft.com/l/team/19%3aRQK4eHK7Z7ogIuZu84k30riyA7YW6fCTF7f54PblHzc1%40thread.tacv2/conversations?groupId=c101108b-7634-4982-9d61-b38deee14681&tenantId=c7456b31-a220-47f5-be52-473828670aa1|MS Teams]] | **Office hours - Ricevimento:** * Prof. Pedreschi: Monday 16:00 - 18:00, Online * Prof. Nanni: appointment by email, Online ===== DM 2 ===== **Classes** ^ Day of Week ^ Hour ^ Room ^ | Monday | 11:00 - 13:00 | [[https://teams.microsoft.com/l/channel/19%3aRQK4eHK7Z7ogIuZu84k30riyA7YW6fCTF7f54PblHzc1%40thread.tacv2/Generale?groupId=c101108b-7634-4982-9d61-b38deee14681&tenantId=c7456b31-a220-47f5-be52-473828670aa1|MS Teams]] | | Thursday | 11:00 - 13:00 | [[https://teams.microsoft.com/l/channel/19%3aRQK4eHK7Z7ogIuZu84k30riyA7YW6fCTF7f54PblHzc1%40thread.tacv2/Generale?groupId=c101108b-7634-4982-9d61-b38deee14681&tenantId=c7456b31-a220-47f5-be52-473828670aa1|MS Teams]] | **Office Hours - Ricevimento:** * Room 268 Dept. of Computer Science * Tuesday: 15-17, Room: MS Teams * Appointment by email ====== 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 version!!!): 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]] * [[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/| DDM]] ====== Class Calendar (2021/2022) ====== ===== First Semester (DM1 - Data Mining: Foundations) ===== ^ ^ Day ^ Room ^ Topic ^ Learning material ^ Recording ^ Instructor ^ |1.| 16.09.2021 11:00-12:45 | Aula Fib A1 | Introduction. | {{ :dm:1.dm_2021-22.overview-corso.pptx_1_.pdf | Introducing DM1 }} {{ dm1_project_guidelines.pptx.pdf | Project-work guidelines (updated 22.11.2021) }} | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Meeting%20in%20_General_-20210916_111002-Meeting%20Recording.mp4?web=1|Lecture 1]] | Pedreschi | |2.| 20.09.2021 11:00-12:45 | Aula Fib C | Course overview | {{ :dm:2.introduction-short.pdf | Overview of contents }} |[[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Meeting%20in%20_General_-20210920_111429-Meeting%20Recording.mp4?web=1|Lecture 2]] | Pedreschi | |3.| 23.09.2021 11:00-12:45 | Aula Fib A1 | Data Understanding | {{ :dm:3.dataunderstanding-2019.pdf | Slides }} | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Data%20Mining%20Lecture%203-20210923_111708-Meeting%20Recording.mp4?web=1|Lecture 3]] | Pedreschi | |4.| 27.09.2021 11:00-12:45 | Aula Fib C | Data Preparation | {{ :dm:3.dm_ml_data_preparation.pdf | Slides }} | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/General-20210927_111919-Meeting%20Recording.mp4?web=1|Lecture 4]] |Pedreschi | |5.| 30.09.2021 11:00-12:45 | Aula Fib A1 | Lab: Data Understanding & Preparation -- Python | {{ :dm:python_basics.ipynb.zip |Python Introduction}} Dataset: {{ :dm:iris.csv.zip | Iris}} {{ :dm:hands_on_dm1_pt1.zip |Hands-On Python (Iris)}} | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/General-20210930_110913-Registrazione%20della%20riunione.mp4?web=1|Lecture 5]] |Citraro | |6.| 04.10.2021 11:00-12:45 | Aula Fib C | Lab: Data Understanding & Preparation -- Python (cont.) & KNIME | Dataset: {{ :dm:titanic.csv.zip | Titanic}} {{ :dm:hands_on_dm1_pt2.zip |Hands-On Python (Titanic)}}, {{ :dm:titanic_data_understanding2.ipynb.zip | Titanic DU+DP (complete)}} KMIME: {{ :dm:00_start_with_knime.zip | Intro}}, {{ :dm:01_data_understanding.zip | KNIME DU+DP}} | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%206%20-%20Lab_%20Data%20Understanding%20%26%20Preparation%20(cont.)-20211004_110939-Registrazione%20della%20riunione.mp4?web=1|Lecture 6]] | Citraro | |7. | 07.10.2021 11:00-12:45 | Aula Fib A1 | Clustering: Intro & K-means | {{ :dm:clustering_1_intro-kmeans_v2.pdf |Clustering intro and k-means}} [revised version] | [[https://unipiit.sharepoint.com/:v:/r/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%207%20-%20Clustering_1-20211007_110727-Meeting%20Recording.mp4?csf=1&web=1&e=N0MiPM|Lecture 7]] | Nanni | | | 11.10.2021 11:00-12:45 | Aula Fib C | | | | | |8. | 14.10.2021 11:00-12:45 | Aula Fib A1 | Clustering: k-means | | [[https://unipiit.sharepoint.com/:v:/r/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%208%20%20-%20Clustering_2-20211014_110548-Meeting%20Recording.mp4?csf=1&web=1&e=3NTFy6|Lecture 8]] | Nanni | | | 18.10.2021 11:00-12:45 | Aula Fib C | | | | | |9. | 21.10.2021 11:00-12:45 | Aula Fib A1 | Clustering: Hierarchical methods |{{ :dm:clustering_2_hierarchical.pdf |Clustering: Hierarchical Methods}} | [[https://unipiit.sharepoint.com/:v:/s/a__td_52415/EeNn5yX1cgVJoPKX-6lhndkB0XWKk9bfeYyau6MFJto5Hg?email=a010703%40unipi.it&e=dGXqcS|Lecture 9]] | Nanni | |10. | 25.10.2021 11:00-12:45 | Aula Fib C | Clustering: density-base methods & exercises| {{ :dm:clustering_3_dbscan.pdf |Clustering: Density-based methods}} | [[https://unipiit.sharepoint.com/:v:/r/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%2010%20-%20Clustering_4-20211025_111320-Meeting%20Recording.mp4?csf=1&web=1&e=nLgpyy|Lecture 10]] | Nanni | |11. | 28.10.2021 11:00-12:45 | Aula Fib A1 | Lab: Clustering | {{ :dm:hands_on_dm1_clustering.zip | Python Hands-On Clust. (Iris)}} {{ :dm:titanic_clustering.ipynb.zip | Python Titanic}} {{ :dm:knime_clustering.zip | Knime }} | [[https://unipiit.sharepoint.com/:v:/r/sites/a__td_52415/Shared%20Documents/General/Recordings/General-20211028_110713-Registrazione%20della%20riunione.mp4?csf=1&web=1&e=QWV4UW|Lecture 11]] | Citraro | |12. | 04.11.2021 11:00-12:45 | Aula Fib A1 | Classification: intro and decision trees | {{ :dm:classification_1_decision_trees_v3.pdf |Classification and decision trees (updated 11.11.2021)}} | [[https://unipiit.sharepoint.com/:v:/r/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%2012%20-%20Classification_1-20211104_110838-Meeting%20Recording.mp4?csf=1&web=1&e=3Z3FhD|Lecture 12]] | Nanni | |13. | 08.11.2021 11:00-12:45 | Aula Fib C | Classification: decision trees/2 | | [[https://unipiit.sharepoint.com/:v:/r/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%2013%20-%20Classification_2-20211108_111102-Meeting%20Recording.mp4?csf=1&web=1&e=V4JgxX|Lecture 13]] | Nanni | |14. | 11.11.2021 11:00-12:45 | Aula Fib A1 | Classification: decision trees/3 | | [[https://unipiit.sharepoint.com/:v:/r/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%2014%20-%20Classification_3-20211111_111114-Meeting%20Recording.mp4?csf=1&web=1&e=jXOes5|Lecture 14]] | Nanni | |15. | 15.11.2021 11:00-12:45 | Aula Fib C | Classification: decision trees/4 | | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%2015%20-%20Classification%20_%204-20211115_111659-Meeting%20Recording.mp4?web=1|Lecture 15]] | Nanni | |16. | 18.11.2021 11:00-12:45 | Aula Fib A1 | Classification: decision trees exercises | {{ :dm:exercise_classification_18.11.2021.pdf |Exercise}} | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%2016%20-%20Classification%20_%205-20211118_111344-Meeting%20Recording.mp4?web=1|Lecture 16]] | Nanni | |17. | 22.11.2021 11:00-12:45 | Aula Fib C | Lab:Classification | {{ :dm:knime_classification.zip | knime_classification}} {{ hands_on_dm1_classification_titanic.zip | Hands_on_Python_Titanic}} {{ classification_iris_python.zip | Python_Iris}} | Online: **TBD** [[https://web.microsoftstream.com/video/10ca5949-cc6b-471c-9ea9-87c5d1d28981|Lecture 17 (offline)]] | Citraro | |18. | 25.11.2021 11:00-12:45 | Aula A1 | Pattern Mining - 1 | {{ 2-dm2-restructured_assoc.pdf |Slides}} | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Lecture%2018%20-%20Pattern%20mining%20%26%20association%20rules-20211125_111501-Registrazione%20della%20riunione.mp4?web=1|Lecture 18]] | Pedreschi | |19. | 29.11.2021 11:00-12:45 | Aula C | Pattern Mining - 2 | | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Meeting%20in%20_General_-20211129_111544-Meeting%20Recording.mp4?web=1|Lecture 19]]| Pedreschi | |20. | 02.12.2021 11:00-12:45 | Aula A1 | Lab: Pattern Mining | {{ :dm:ex-frequentpatterns-ar.pdf | Apriori Exercise}} {{hands_on_dm1_pattern_mining.zip| Hands_on_Python_Titanic}} {{ :dm:pattern_knime.zip |KNIME}} | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Riunione%20in%20_Generale_-20211202_110709-Registrazione%20della%20riunione.mp4?web=1|Lecture 20]]| Citraro | ===== Second Semester (DM2 - Data Mining: Advanced Topics and Applications) ===== ^ ^ Day ^ Room [[https://teams.microsoft.com/l/team/19%3aRQK4eHK7Z7ogIuZu84k30riyA7YW6fCTF7f54PblHzc1%40thread.tacv2/conversations?groupId=c101108b-7634-4982-9d61-b38deee14681&tenantId=c7456b31-a220-47f5-be52-473828670aa1|Teams]] ^ Topic ^ Learning material ^ Instructor ^ Recordings ^ | 01.| 14.02.2022 11:00--13:00 | C | Introduction, CRIPS, Evaluation, KNN | {{ :dm:00_dm2_intro_2022.pdf | Intro}}, {{ :dm:01_dm2_crispdm_2022.pdf | CRISP}}, {{ :dm:02_dm2_performance_evaluation_2022.pdf | Eval}}, {{ :dm:03_dm2_knn_2022.pdf | KNN}}, {{ :dm:01_knn_eval.ipynb.zip | Notebbok_KNN_Eval}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%201-20220214_110921-Registrazione%20della%20riunione.mp4?web=1|link]] | | 02.| 17.02.2022 11:00--13:00 | A1 | Imbalanced Learning, Evaluation | {{ :dm:04_dm2_imbalanced_learning_2022.pdf |ImbLearn}} {{ :dm:02_dm2_performance_evaluation_2022.pdf | Eval}}, {{ :dm:02_imbalance.ipynb.zip | ImbLearn}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%202-20220217_110416-Registrazione%20della%20riunione.mp4?web=1|link]] | | 03.| 21.02.2022 11:00--13:00 | C | Dimensionality Reduction | {{ :dm:05_dm2_dimred_2022.pdf | DimRed}}, {{ :dm:03_dimensionality_reduction.ipynb.zip |Notebook_DimRed}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%203-20220221_110148-Registrazione%20della%20riunione.mp4?web=1|link]] | | 04.| 24.02.2022 11:00--13:00 | A1 | Outlier Detection (part 1) | {{ :dm:06_dm2_anomaly_detection_2022.pdf | Outlier Detection}}, {{ :dm:04_outlier_detection.ipynb.zip | Notebook_OutlierDetection}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Riunione%20in%20_Generale_-20220224_111017-Registrazione%20della%20riunione.mp4?web=1|link]] | | 05.| 28.02.2022 11:00--13:00 | C | Outlier Detection (part 2) | {{ :dm:06_dm2_anomaly_detection_2022.pdf | Outlier Detection}}, {{ :dm:04_outlier_detection.ipynb.zip | Notebook_OutlierDetection}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%205-20220228_110252-Registrazione%20della%20riunione.mp4?web=1|link]] | | 06.| 03.03.2022 11:00--13:00 | A1 | Outlier Detection (part 3) | {{ :dm:06_dm2_anomaly_detection_2022.pdf | Outlier Detection}}, {{ :dm:04_outlier_detection.ipynb.zip | Notebook_OutlierDetection}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%206-20220303_110100-Registrazione%20della%20riunione.mp4?web=1|link]] | | 07.| 07.03.2022 11:00--13:00 | C | Naive Bayes Classifier, Linear Regression | {{ :dm:07_dm2_naive_bayes_2022.pdf | NBC }}, {{ :dm:05_naive_bayes.ipynb.zip |Notebook_NBC}}, {{ :dm:08_dm2_linear_regression_2022.pdf | LinReg}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%207-20220307_110235-Registrazione%20della%20riunione.mp4?web=1|link]] | | 08.| 10.03.2022 11:00--13:00 | A1 | Linear Regression, Gradient Descent, Maximum Likelihood Estimation, Odds | {{ :dm:08_dm2_linear_regression_2022.pdf | LinReg}}, {{ :dm:09_dm2_gradient_descent_2022.pdf | GradDes}}, {{ :dm:10_dm2_maximum_likelihood_estimation_2022.pdf |MLE}}, {{ :dm:11_dm2_odds_2022.pdf |Odds}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20Lecture%208-20220310_110404-Registrazione%20della%20riunione.mp4?web=1|link]] | | 09.| 14.03.2022 11:00--13:00 | C | Logistic Regression, Support Vector Machines | {{ :dm:12_dm2_logistic_regression_2022.pdf | LogReg}}, {{ :dm:13_dm2_svm_2022.pdf | SVM}}, {{ :dm:06_linear_logistic_regression.ipynb.zip | Notebook_LR}}, {{ :dm:07_support_vector_machines.ipynb.zip | Notebook_SVM}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%209-20220314_110133-Registrazione%20della%20riunione.mp4?web=1|link]] | | 10.| 17.03.2022 11:00--13:00 | A1 | Linear and Logistic Perceptron | {{ :dm:14_dm2_perceptron_2022.pdf | Perceptron}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2010-20220317_110406-Registrazione%20della%20riunione.mp4?web=1|link1]], [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2010-20220317_120647-Registrazione%20della%20riunione.mp4?web=1|link2]] | | 11.| 21.03.2022 11:00--13:00 | C | Neural Networks | {{ :dm:15_dm2_neural_network_2022.pdf | NeuralNetwork}}, {{ :dm:08_neural_networks.ipynb.zip | Notebook_NN}}, {{ :dm:09_neural_network_implementation.ipynb.zip | Notebook_NN_impl}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2011-20220321_105831-Registrazione%20della%20riunione.mp4?web=1|link]] | | 12.| 24.03.2022 11:00--13:00 | A1 | Ensemble Classifiers, Bagging, Random Forest | {{ :dm:16_dm2_ensemble_2022.pdf | EnsembleClassifiers}}, {{ :dm:10_ensemble.ipynb.zip | Notebook_ENS}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2012-20220324_110413-Registrazione%20della%20riunione.mp4?web=1|link]] | | 13.| 28.03.2022 11:00--13:00 | C | Boosting, Gradient Boost | {{ :dm:17_dm2_gradient_boost_2022.pdf | GBM}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2013-20220328_110316-Registrazione%20della%20riunione.mp4?web=1|link]] | | 14.| 31.03.2022 11:00--13:00 | A1 | XGBoost, LightGBM | {{ :dm:17_dm2_gradient_boost_2022.pdf | GBM}}, {{ :dm:11_gbm.ipynb.zip | Notebook_GBM}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2014-20220331_110117-Registrazione%20della%20riunione.mp4?web=1|link]] | | 15.| 04.04.2022 11:00--13:00 | C | Time Series Introduction, Distance Functions | {{ :dm:19_dm2_time_series_similarity_2022.pdf | TS_Intro_Distances}}, {{ :dm:13_time_series_sim_appr_clus.ipynb.zip | Notebook_TS_Sim}}, {{ :dm:14_ts_dtw.ipynb.zip | Notebook_TS_DTW_Impl}}, {{ :dm:15_ts_dtw_constraints.ipynb.zip | Notebook_TS_DTW_Constr_Impl}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Riunione%20in%20_Generale_-20220404_110628-Registrazione%20della%20riunione.mp4?web=1|link]] | | 16.| 07.04.2022 11:00--13:00 | A1 | Time Series Approximations, Clustering | {{ :dm:20_dm2_time_series_clustering_approximation_2022.pdf | TS_Approx_Clustering}}, {{ :dm:13_time_series_sim_appr_clus.ipynb.zip | Notebook_TS_ApproxClus}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2016-20220407_110856-Registrazione%20della%20riunione.mp4?web=1|link]] | | 17.| 11.04.2022 11:00--13:00 | C | Time Series Motifs, Discord, Matrix Profile | {{ :dm:21_dm2_time_series_matrix_profile_2022.pdf | TS_MatrixProfile}}, {{ :dm:16_time_series_shapelet_motif.ipynb.zip | TS_MatrixProfile}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2017-20220411_105811-Registrazione%20della%20riunione.mp4?web=1|link]] | | 18.| 14.04.2022 11:00--13:00 | A1 | Time Series Classification | {{ :dm:22_dm2_time_series_classification_2022.pdf | TS_Classification}}{{ :dm:17_time_series_classification.ipynb.zip | Notebook_TSC}}, {{ :dm:18_tsc_state_of_the_art.ipynb.zip | Notebook_TSC_SoA}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2018-20220414_110500-Registrazione%20della%20riunione.mp4?web=1|link]] | | 19.| 21.04.2022 11:00--13:00 | A1 | Sequential Pattern Mining | {{ :dm:23_dm2_sequential_pattern_mining_2022.pdf | SPM}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Riunione%20in%20_Generale_-20220421_110330-Registrazione%20della%20riunione.mp4?web=1|link]] | | 20.| 28.04.2022 11:00--13:00 | A1 | Sequential Pattern Mining | {{ :dm:23_dm2_sequential_pattern_mining_2022.pdf | SPM}}, {{ :dm:19_sequential_pattern_mining.ipynb.zip | Notebook_SPM}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/Riunione%20in%20_Generale_%20-20220428_091527-Meeting%20Recording.mp4?web=1|link]] | | 21.| 02.05.2022 11:00--13:00 | C | Advanced Clustering Approaches | {{ :dm:24_dm2_advanced_clustering_algorithms_2022.pdf | Advanced_Clustering}}, {{ :dm:20_advanced_clustering.ipynb.zip | Notebook_AC}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2021-20220502_110330-Registrazione%20della%20riunione.mp4?web=1|link]] | | 22.| 05.05.2022 11:00--13:00 | A1 | Transactional Clustering | {{ :dm:25_dm2_transactional_clustering_2022.pdf | Transactional Clustering}}, {{ :dm:20_advanced_clustering.ipynb.zip | Notebook_TC}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2022-20220505_111359-Registrazione%20della%20riunione.mp4?web=1|link]] | | 23.| 09.05.2022 11:00--13:00 | C | Explainable Artificial Intelligence | {{ :dm:26_dm2_explainability_2022.pdf |Explainability}}, {{ :dm:xai.zip | Notebook_XAI}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2023-20220509_110513-Registrazione%20della%20riunione.mp4?web=1|link]] | | 24.| 12.05.2022 11:00--13:00 | A1 | Explainable Artificial Intelligence | {{ :dm:26_dm2_explainability_2022.pdf |Explainability}}, {{ :dm:xai.zip | Notebook_XAI}} | Guidotti | [[https://unipiit.sharepoint.com/sites/a__td_52415/Shared%20Documents/General/Recordings/DM2%20-%20Lecture%2024-20220512_110913-Registrazione%20della%20riunione.mp4?web=1|link]] | ====== Exams ====== ===== 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, frequent pattern mining, and classification (guidelines will be provided for more details). The project has to be performed by min 3, max 4 people. It has to be performed by using Knime, Python or a combination of them. 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 [[datamining.unipi@gmail.com]]. Please, use “[DM1 2021-2022] Project” in the subject. === Project 1 === - Assigned: 30/09/2021 - MidTerm Deadline: **21/11/2021** (half project required, i.e., Data understanding & Preparation and at least 2 clustering algorithms) - Final Deadline: **14/01/2022** (complete project required) - Data: choose between {{ :dm:glasgow_norms.zip | Glasgow Norms}}, {{ :dm:Seismic_Bumps.zip | Seismic Bumps}} === Project 2 === - Assigned: After Project 1 Final Deadline - Data: [[https://www.kaggle.com/arashnic/hr-analytics-job-change-of-data-scientists?select=aug_train.csv|Hr-Analytics]] - Deadline: one week before the oral exam ===== Exam DM part II (DMA) ====== ** Exam Rules** * Rules for DM2 exam available {{ :dm:dm2_exam_rules.pdf | here}}. **Exam Booking Periods** * 3rd Appello: 08/05/2022 00:00 - 05/06/2022 23:59 * 4th Appello: 29/05/2022 00:00 - 26/06/2022 23:59 * 5th Appello: 19/06/2022 00:00 - 17/07/2022 23:59 * 6th Appello: 07/07/2022 00:00 - 31/08/2022 23:59 **Exam Booking Agenda** * Agenda Link: [[https://agende.unipi.it/pyb-lbo-ksq|here]] * 3rd Appello: starts 07/06/2022 * 4th Appello: starts 28/06/2022 * 5th Appello: starts 19/07/2022 * 6th Appello: starts 05/09/2022 * Important! if you book in the agenda in data in days between 07/06/2022 and 27/06/2022 you MUST be registered for the 3rd appello, if you book in the agenda in data in days between 28/06/2022 and 18/07/2022 you must be registered for the 4th appello, if you book in the agenda in data in days after 19/07/2022 you must be registered for the 5th appello. For online exams the camera must remain open and you must be able to share your screen. For the online exams could be required the usage of the Miro platform (https://miro.com/app/dashboard/). The exam is composed of two parts: * A **project**, that consists in employing the methods and algorithms presented during the classes for solving exercises on a given dataset. The project has to be realized by max 3 people. The results of the different tasks must be reported in a unique paper. The total length of this paper must be max 30 pages (suggested 25) of text including figures + 1 cover page (minimum font 11, minimum interline 1). The project must be delivered at least 7 days before the oral exam. The project must be delivered to [[riccardo.guidotti@unipi.it]] AND [[francesco.spinnato@sns.it]] with subject "[DM2 Project]" * An **oral exam**, that includes: (1) discussing topics presented during the classes, including the theory of the parts already covered by the written exam; (2) resolving simple exercises using the Miro platform; (3) discussing the project report with a group presentation; * **Dataset**: the data is about Human Activity Recognition * Data can be downloaded [[https://archive.ics.uci.edu/ml/datasets/human+activity+recognition+using+smartphones#|here]] * Submission Draft 1: 20/04/2022 23:59 Italian Time (we expect Modules 1 and 2) * Submission Draft 2: 20/05/2022 23:59 Italian Time (we expect Modules 1, 2 and 3) * Final Submission: one week before the oral exam. ** Project Guidelines ** * **Module 1 - Imbalanced Learning, Dimensionality Reduction, Anomaly Detection** - Explore and prepare the dataset. You are allowed to take inspiration from existing notebooks you can find online and figure out your personal research perspective (from choosing a subset of variables to the class to predict…). You are welcome in creating new variables and performing all the pre-processing steps the dataset needs. - Define one or more (simple) classification tasks and solve them with Decision Tree and KNN. - Identify the top 1% outliers: adopt at least three different methods from different families (e.g., density-based, angle-based... ) and compare the results. Deal with the outliers by removing them from the dataset or by treating the anomalous variables as missing values and employing replacement techniques. In this second case, you should check that the outliers are not outliers anymore. Justify your choices in every step. - Analyze the value distribution of the class to predict with respect to point 2; if it is unbalanced leave it as it is, otherwise turns the dataset into an imbalanced version (e.g., 96% - 4%, for binary classification). Then solve the classification task using the Decision Tree or the KNN by adopting various techniques of imbalanced learning. - Exploit and tests different dimensionality reduction techniques for (i) visualization in two dimensions, (ii) improve classification performance, (iii) improve outlier detection. - Draw your conclusions about the techniques adopted in this analysis. * **Module 2 - Advanced Classification Methods** - Solve the classification task defined in Module 1 (or define new ones) with the other classification methods analyzed during the course: Naive Bayes Classifier, Logistic Regression, Support Vector Machines, Neural Networks, Ensemble Methods, Gradient Boosting Machines and evaluate each classifier with the techniques presented in DM1 (accuracy, precision, recall, F1-score, ROC curve). Perform hyper-parameter tuning phases and justify your choices. - Besides the numerical evaluation draw your conclusions about the various classifiers, e.g. for Neural Networks: what are the parameter sets or the convergence criteria which avoid overfitting? For Ensemble classifiers how the number of base models impact the classification performance? For any classifier which is the minimum amount of data required to guarantee an acceptable level of performance? Is this level the same for any classifier? What is revealing the feature importance of Random Forests? - Select two continuous attributes, define a simple linear univariate regression problem and try to solve it using different techniques reporting various evaluation measures. Plot the two-dimensional dataset. Then generalize to multiple linear regression and observe how the performance varies. Solve it using linear regressions, regularized linear regressions (such as Lasso and Ridge) but also machine learning approaches such as Gradient Boosting Machines. * **Module 3 - Time Series Analysis** - Prepare a dataset on which you can run time series clustering; motif/anomaly discovery and classification. - On the dataset created, compute classification with KNN based on Euclidean/Manhattan and DTW distances and compare the results. - To perform the clustering you can choose among different distance functions and clustering algorithms. Remember that you can reduce the dimensionality through time series approximation. Analyze the clusters and highlight similarities and differences. - Analyze the dataset for finding motifs and/or anomalies. Visualize and discuss them and their relationship with other features. - Solve the classification task on the time series dataset(s) and evaluate each result. In particular, you should use shapelet-based classifiers and structural-based classifiers. Analyze the shapelets retrieved and discuss if there are any similarities/differences with motifs and/or shapelets. * **Module 4 - Sequential Patterns and Advanced Clustering** - Sequential Pattern Mining: Convert the time series into a discrete format (e.g., by using SAX) and extract the most frequent sequential patterns (of at least length 3/4) using different values of support, then discuss the most interesting sequences. - Advanced Clustering: On a dataset already prepared for one of the previous tasks in Module 1 or Module 2, run at least one clustering algorithm presented in the advanced clustering lectures (e.g. X-Means, Bisecting K-Means, OPTICS). Discuss the results that you find analyzing the clusters and reporting external validation measures (e.g SSE, silhouette). * **Module 5 - Explainability** - Try to use one or more explanation methods (e.g., TREPAN, LIME, LORE, SHAP, Counterfactual Explainers, etc.) to illustrate the reasons for the classification in one of the steps of the previous tasks. N.B. When "solving the classification task", remember, (i) to test, when needed, different criteria for the parameter estimation of the algorithms, and (ii) to evaluate the classifiers (e.g., Accuracy, F1, Lift Chart) in order to compare the results obtained with an imbalanced technique against those obtained from using the "original" dataset. ====== Exam Dates ====== ===== Exam Sessions ===== ^ Session ^ Date ^ Time ^ Room ^ Notes ^ Marks ^ |1.|11.01.2022| 14:00 - 18:00| [[https://teams.microsoft.com/l/team/19%3aeebd8a88148d433582ca36bc54d6e441%40thread.tacv2/conversations?groupId=adba5ac4-f242-40be-b8aa-e375da1d4f2c&tenantId=c7456b31-a220-47f5-be52-473828670aa1|MS Teams]] | Please, use the system for registration: https://esami.unipi.it/ | | |3.|07.06.2022| | | Please, use the system for registration: https://esami.unipi.it/ | | |4.|28.06.2022| | | Please, use the system for registration: https://esami.unipi.it/ | | |5.|19.07.2022| | | Please, use the system for registration: https://esami.unipi.it/ | | |6.|05.09.2022| | | Please, use the system for registration: https://esami.unipi.it/ | | ===== 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.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]] * [[dm.2010-11]] * [[dm.2009-10]] * [[dm.2008-09]] * [[dm.2007-08]] * [[dm.2006-07]] * [[PhDWorkshop2011]] * [[SNA.Ingegneria2011]] * [[SNA.IMT.2011]] * [[MAINS.SANTANNA.2011-12]] * [[MAINS.SANTANNA.DM4CRM.2012]] * [[MAINS.SANTANNA.DM4CRM.2016]] * [[MAINS.SANTANNA.DM4CRM.2017 | Data Mining for Customer Relationship Management 2017]] * [[MAINS.SANTANNA.DM4CRM.2018]] * [[MAINS.SANTANNA.DM4CRM.2019]] * [[SDM2018 | Instructions for camera ready and copyright transfer]] * [[DM-SAM | Storie dell'Altro Mondo]] * [[DM-I40 | Master Industry 4.0]]