Analytics labs notebooks, supporting analytics teaching for BSc and MSc business school modules. Currently, there are 12 labs uploaded divided into four topics:
-
Introduction to Python: First few steps. Simple intro for people who might be already familiar with other languages, not meant for people with no programming experience!
-
Revenue Management: Implementation of simple algorithms (Littlewood, EMSR-a and EMSR-b). Also teaches about functions, assignments, etc.
-
Data Preprocessing: Simple data preprocessing using pandas and scikit-learn.
-
Weight of evidence transformation: How to calculate Weight of Evidence transformations in Python. Uses the excellent scorecardpy package by @ShichenXie.
-
Logistic Regression: Intro to scikit-learn and how to run a Lasso and Ridge regression.
-
Scorecards and Random Forest: How to estimate a scorecard, run a Random Forest, and compare ROC curves.
-
Introduction to Keras and Shallow ANN: Gentle introduction to Keras and Tensorflow.
-
Embeddings: How to calculate embedding layers, and how to use pre-trained embeddings. Currently uses Facebook's fasttext library.
-
1D CNN and Keras' Model API: Intro to CNN, and how to use Keras' Model API. Also contains an implementation of Kim et al. (2014) CNN for text analytics.
-
2D CNN and Gradient Backtracing: 2D Convolutions for image classification. Use of pre-trained models (VGG16), training of own models and separable convolutions, and gradient backtracing to visualize what is being used to discriminate.
-
SQL Refresher: Refresher on SQL, how to access it from Python, and a very light introduction to SQLAlchemy.
-
Primer on Visualization: A few plots using pyplot, seaborn and plotly. Very introductory primer.
These labs are available under the GPL v3, feel free to use them as you wish. I'll be grateful if you can point to the Github, as I'll keep these updated in subsequent iterations of the modules where I teach this. As always, these notebooks are provided with no guarantees.
Comments are welcome!