Data Science: ausgewählte Ressourcen
Diese Seite kommentiert ausführlich einige Bücher, Tutorials und andere Online-Ressourcen, die mir im Rahmen von Recherchen besonders aufgefallen sind.
Python
Python ist eine sehr schöne und moderne Sprache, die man sowieso lernen will. Ohne Python geht in Data Science gar nichts.
(Früher war bisweilen noch R wichtig. R wird von Mathematikern zurecht immer noch wertgeschätzt, tritt aber in der Praxis insbesondere dort zunehmend zurück, wo die der Analyse zugrundeliegenden Daten erst vorverarbeitet werden müssen. Bitte aber selbst ein Bild machen: google nach "R versus Python", finde z.B. hier oder hier).
Python ist eine komplexe Sprache mit wunderbaren fancy Features. Man kann Python aber auch lediglich als Skript-Sprache verwenden, mit der nacheinander verschiedene Datenanalyse-Schritte abgearbeitet werden - und dieser Anspruch genügt für die Veranstaltung dsci.
Das für dsci erforderliche Wissen fasst Jake Vanderplas in einem kleinen, aber feinen Büchlein konzise zusammen:
- python-whirlwind
-
Jake Vanderplas: A Whirlwind Tour of Python, O’Reilly 2016. 978-1-491-96465-1
als pdf https://jakevdp.github.io/WhirlwindTourOfPython/ > "The content is also available [...] from O'Reilly site as a free e-book or free pdf": http://www.oreilly.com/programming/free/files/a-whirlwind-tour-of-python.pdf
Code bei github: https://github.com/jakevdp/WhirlwindTourOfPython | https://jakevdp.github.io/WhirlwindTourOfPython/
Lizenz: CC0, d.h. fast beliebige (!) Wiederverwendung erlaubt
Wer schon Java oder C gelernt hat, wird an einem Umsteiger-Tutorial Gefallen finden:
- python-learnxinyminutes
-
Learn X in Y minutes, where X=python3: https://learnxinyminutes.com/docs/python3/
JB: Kommentierter Python-Code, kurz und knapp.
- python-for-java-developers
-
Python Primer for Java Developers: https://lobster1234.github.io/2017/05/25/python-java-primer/
JB: gut für schnelles Umsteige-Lernen
Wer nochmal von weiter von vorne beginnen will findet hier einen guten Einstieg:
- python-org-BeginnersGuide
Oder ganz von vorne - z.B. als Mathematiker, der sich in Python einlesen will?
- datacamp_intro-to-python-for-data-science
-
https://www.datacamp.com/courses/intro-to-python-for-data-science
(Kapitel 1 ist kostenlos, die anderen Kapitel sind kostenpflichtig: ca. 200$ / Jahr)
Empfehlung JB: sehr schöne technische Lernumgebung, mit unmittelbarem und engem Feedback, inclusive Hinweisen zur Lösung. M.E. vorbildlich!
Grundlagen
Als Lehrversuch ist für das WS 2020 geplant, nicht eine eigene Vorlesung, sondern externe Medien als Vorlesungs-Ersatz zu verwenden.
- Einbettung in die Präsenzlehre unserer HAW: Konzept_2020-03-26
Der hierbei verwendte Grundlagenstoff stammt aus den sehr praxisorientierten Kursen von kaggle-learn:
- kaggle-learn
- kaggle-learn-python (Colin Morris)
-
https://www.kaggle.com/learn/python
- 1 Hello, Python
- 2 Functions and Getting Help
- 3 Booleans and Conditionals
- 4 Lists
- 5 Loops and List Comprehensions
- kaggle-learn-intro-to-machine-learning (Dan Becker)
-
https://www.kaggle.com/learn/intro-to-machine-learning
- 1 How Models Work: The first step if you're new to machine learning
- 2 Basic Data Exploration: Load and understand your data
- 3 Your First Machine Learning Model: Building your first model. Hurray!
- 4 Model Validation: Measure the performance of your model ? so you can test and compare alternatives
- 5 Underfitting and Overfitting: Fine-tune your model for better performance.
- 6 Random Forests: Using a more sophisticated machine learning algorithm.
- kaggle-learn-intermediate-machine-learning (Alexis Cook)
-
https://www.kaggle.com/learn/intermediate-machine-learning
- 2 Missing Values: Missing values happen. Be prepared for this common challenge in real datasets.
- 3 Categorical Variables: There's a lot of non-numeric data out there. Here's how to use it for machine learning
- 4 Pipelines: A critical skill for deploying (and even testing) complex models with pre-processing
- 5 Cross-Validation: A better way to test your models
- 6 XGBoost: The most accurate modeling technique for structured data
- 7 Data Leakage: Find and fix this problem that ruins your model in subtle ways
- kaggle-learn-data-visualization (Alexis Cook)
-
https://www.kaggle.com/learn/data-visualization
- 2 Line Charts: Visualize trends over time
- 3 Bar Charts and Heatmaps: Use color or length to compare categories in a dataset
- 4 Scatter Plots: Leverage the coordinate plane to explore relationships between variables
- 5 Distributions: Create histograms and density plots
- 6 Choosing Plot Types and Custom Styles: Customize your charts and make them look snazzy
- kaggle-learn-pandas (Aleksey Bilogur)
-
https://www.kaggle.com/learn/pandas
- 1 Creating, Reading and Writing: You can't work with data if you can't read it. Get started here.
- 2 Indexing, Selecting & Assigning: Pro data scientists do this dozens of times a day. You can, too!
- 3 Summary Functions and Maps: Extract insights from your data.
- 4 Grouping and Sorting: Scale up your level of insight. The more complex the dataset, the more this matters
- 5 Data Types and Missing Values: Deal with the most common progress-blocking problems
- 6 Renaming and Combining: Data comes in from many sources. Help it all make sense together
- kaggle-learn-feature-engineering (Mat Leonard)
-
https://www.kaggle.com/learn/feature-engineering
- 1 Baseline Model: Building a baseline model as a starting point for feature engineering
- 2 Categorical Encodings: There are many ways to encode categorical data for modeling. Some are pretty clever.
- 3 Feature Generation: The frequently useful case where you can combine data from multiple rows into useful features
- 4 Feature Selection: You can make a lot of features. Here's how to get the best set of features for your model.
Die Kaggle-Kurse sind extrem praxisorientiert angelegt. Die erforderliche Theorie dazu gibt es in diesem absoluten Standard-Werk:
- ISLR
-
Introduction to Statistical Learning
Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani: An Introduction to Statistical Learning, with Applications in R.
https://faculty.marshall.usc.edu/gareth-james/ISL/
ISLR verwendet R. Hier gibt es entsprechenden Code in Python:
https://github.com/civisanalytics/python-glmnet
(ISLR bitte nicht verwechseln mit ESL)
Die Informatik-Seite wird ausführlichst hier beschrieben:
- python-data-science-handbook
-
Jake VanderPlas: Python Data Science Handbook.
https://jakevdp.github.io/PythonDataScienceHandbook/
The content is available on GitHub in the form of Jupyter notebooks: https://github.com/jakevdp/PythonDataScienceHandbook
DE aus der Bibliothek: Data Science mit Python: Das Handbuch für den Einsatz von IPython, Jupyter, NumPy, Pandas, Matplotlib, Scikit-Learn.
Für den Prozess selbst gibt es CRISP-DM:
- CRISP-DM
-
CRISP-DM: Cross-industry standard process for data mining
CRISP-DM 1.0 Step-by-step data mining guide Pete Chapman (NCR), Julian Clinton (SPSS), Randy Kerber (NCR), Thomas Khabaza (SPSS), Thomas Reinartz (DaimlerChrysler), Colin Shearer (SPSS) and Rüdiger Wirth (DaimlerChrysler). © 2000 SPSS Inc. CRISPMWP-1104
Weiterführend
- Bowles
-
Michael Bowles: Machine learning in Python: essential techniques for predictive analysis. Wiley 2015
Bibliothek: https://opac.haw-landshut.de/search?bvnr=BV043397686 | pdf: https://bibaccess.fh-landshut.de:3159/doi/book/10.1002/9781119183600
Wertung: In den letzten 2-3 Jahren sind dutzende Bücher zum Thema Data Science erschienen. Mir gefällt das Buch von Bowles sehr gut, da es an zwei wichtigen Modellen detailliert den Weg von den Daten zum qualitätsgesicherten Modell zeigt.
Dass die Code-Beispiele noch in Python 2.7 sind ist unerheblich, da der Code ohnehin nur exemplarischen Charakter hat. In der Praxis benutzt man Bibliotheken statt den Code von Bowles. Es ist Teil der Veranstaltung, den Code aus Bowles unter Rückgriff auf MLPC in wenigen Zeilen zu re-implementieren.
- MLPC
-
Chris Albon: Machine Learning with Python. O'Reilly 2018
Auch auf DE erhältlich, O'Reilly 2019
Wir haben eigens für diese Veranstaltung in die Bibliothek der HAW LA einige Exemplare anschaffen lassen: EN, DE
- ESL
-
Trevor Hastie, Robert Tibshirani, Jerome Friedman: The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Second Edition, February 2009
https://web.stanford.edu/~hastie/ElemStatLearn//
(Vorsicht: ESL ist die mathematische Seite von ISLR für Interessierte. Im Kurs DataScience genügt uns ISLR).
- SLS
-
Trevor Hastie, Robert Tibshirani, Martin Wainwright: Statistical Learning with Sparsity. The Lasso and Generalizations, o.J. [2016], 362 pages
https://web.stanford.edu/~hastie/StatLearnSparsity_files/SLS_corrected_7.28.16.pdf
Die Bibliotheken: numpy, pandas, scikit-learn
Data Science in Python besteht vor allem in der genauen Kenntnis der Bibliotheken Pandas und Scikit-learn, und zwar (a) exemplarisch in Details, aber auch (b) bzgl. dem Aufbau der Dokumenation an sich, um schnelles Nachschlagen zu ermöglichen.
- pandas
- scikit-learn
- pandas-cheat-sheet
-
https://github.com/pandas-dev/pandas/blob/master/doc/cheatsheet/Pandas_Cheat_Sheet.pdf.
google nach "pandas cheat sheet", finde z.b. die Übersicht https://pbpython.com/pages/resources.html#cheat-sheets.
Pandas ist sicherlich die wichtigste Grundlage. Interessant ist z.B. die Lernpfad-Empfehlung How to Learn Pandas von Ted Petrou.
Im Prinzip ist auch NumPy wichtig, vor allem die Datenstruktur ndarray. Aber wir lernen NumPy eher ergänzend, durch Nachschlagen bei Bedarf, nicht systematisch.
Die Community der großen Bibliotheken stellt selbst viele praxisorientierte, didaktisierte Einführungen für ihre Bibliotheken bereit:
- scipy-lectures-scikit-learn
- tom-augspurger
-
Tom Augspurger: Effective Pandas.
Software
In meinen Lehrveranstaltungen arbeiten wir mit einer vorinstallierten virtuellen Ubuntu-Maschine unter Oracle, Virtualbox, siehe dsci-lab.
Die folgende Software ist im dsci-lab bereits installiert:
- miniconda
-
Download: https://docs.conda.io/en/latest/miniconda.html
Installation: https://conda.io/projects/conda/en/latest/user-guide/install/linux.html
Wir arbeiten mit Python 3.x (derzeit 3.7)
- jupytext
-
https://github.com/mwouts/jupytext
Übersicht: https://towardsdatascience.com/introducing-jupytext-9234fdff6c57
- pandoc
Ergänzende Software:
- anaconda
-
Download: https://www.anaconda.com/download/
Anaconda bietet Jupyter Notebooks und JupyterLab an
/misc
Viele Autoren, öffentliche Organisationen (Hochschulen) oder private Bildungsanbieter bieten z.T. sehr umfangreiche Tutorials für alle Aspekte der Data Science an.
Tutorials für Menschen, die gerne mit Tutorials lernen:
- L1: python-datacamp
-
https://www.datacamp.com/courses/intro-to-python-for-data-science
4 hours | 11 Videos | 57 Exercises | (mit Anmeldung)JB: 4h = ein Nachmittag: Warum nicht mal machen?
Ein schönes Beginners Level Python-Tutorial, das auch schon in NumPy einführt
- machine-learning-tutorial-python-introduction
-
https://pythonprogramming.net/machine-learning-tutorial-python-introduction/ 66 Abschnitte Tabelle TRT auf Moodle
- data-analysis-python-pandas-tutorial-introduction
-
https://pythonprogramming.net/data-analysis-python-pandas-tutorial-introduction/ 16 * 15 min pro Abschnitt
- w3resource-python-exercises
-
interaktive Lernerfolgskontrollen bei w3resources
https://www.w3resource.com/python-exercises/numpy/index.php, dort insbesondere NumPy Basic [40 exercises with solution] NumPy arrays [100 exercises with solution]
https://www.w3resource.com/python-exercises/pandas/index.php, dort insbesondere Python Pandas Data Series [15 exercises with solution] Python Pandas DataFrame [63 exercises with solution]
Plattformen und Communities
- kaggle
-
(Kaggle ist eine Google-Company)
- google-datalab
- kdnuggets
- analyticsvidhya
- arxiv-sanity
- github
-
Standard-Plattform, die man als Informatiker kennen muss.
Sonstige Online-Tutorials
- python-codeacademy
-
https://www.codecademy.com/learn/learn-python
Von Kaggle empfohlen, von uns aber abgewertet wegen zu strikter Lernpfad-Vorgabe
- git-book
-
Scott Chacon, Ben Straub: Pro Git book. Apress 2014.
Glossare
- analyticsvidhya-machine-learning-glossary
-
https://www.analyticsvidhya.com/glossary-of-common-statistics-and-machine-learning-terms/
- google-machine-learning-glossary
- datascienceglossary.org
Curricula
- edison
-
Edison Curriculum Data Science
http://edison-project.eu/data-science-model-curriculum-mc-ds
auch interessant
Python und Musik
Meinungsartikel
CRISP-DM Model
CRISP-DM 1.0 Step-by-step data mining guide Pete Chapman (NCR), Julian Clinton (SPSS), Randy Kerber (NCR), Thomas Khabaza (SPSS), Thomas Reinartz (DaimlerChrysler), Colin Shearer (SPSS) and Rüdiger Wirth (DaimlerChrysler). © 2000 SPSS Inc. CRISPMWP-1104 (CRISP-DM)
Phases, Tasks, Outputs
Die folgende Tabelle gibt für Zwecke der besseren Lesbarkeit den Text der Abbildung Figure 3: Generic tasks (bold) and outputs (italic) of the CRISP-DM reference model digital wider.
Business Understanding | Determine Business Objectives | Background |
Business Objectives | ||
Business Success Criteria | ||
Assess Situation | Inventory of Resources | |
Requirements, Assumptions, and Constraints | ||
Risks and Contingencies | ||
Terminology | ||
Costs and Benefits | ||
Determine Data Mining Goals | Data Mining Goals | |
Data Mining Success Criteria | ||
Data Understanding | Collect Initial Data | Initial Data Collection Report |
Describe Data | Data Description Report | |
Explore Data | Data Exploration Report | |
Verify Data Quality | Data Quality Report | |
Data Preparation | Select Data | Rationale for Inclusion/ Exclusion |
Clean Data | Data Cleaning Report | |
Construct Data | Derived Attributes | |
Generated Records | ||
Integrate Data | Merged Data | |
Format Data | Reformatted Data | |
Dataset | Dataset Description | |
Modeling | Select Modeling Techniques | Modeling Technique |
Modeling Assumptions | ||
Generate Test Design | Test Design | |
Build Model | Parameter Settings | |
Models | ||
Model Descriptions | ||
Assess Model | Model Assessment | |
Revised Parameter Settings | ||
Evaluation | Evaluate Results | Assessment of Data Mining Results w.r.t. Business Success Criteria |
Approved Models | ||
Review Process | Review of Process | |
Determine Next Steps | List of Possible Actions | |
Decision | ||
Deployment | Plan Deployment | Deployment Plan |
Plan Monitoring and Maintenance | Monitoring and Maintenance Plan | |
Produce Final Report | Final Report | |
Final Presentation | ||
Review Project | Experience Documentation |