Math & Stat

Mathematics

MAT1400 Calculs [Class notes UdeM Winter 2020(in French) with Anne Bourlioux]

Chapitre 1: Chapitre 1.pdf Chapitre 2: Chapitre 2.pdf Chapitre 3 & Annexe: Annexe & Chapitre3.pdf
Chapitre 4: Chapitre 4.pdf Chapitre 5: Chapitre 5.pdf Chapitre 6 & 7: Chapitre 6 & 7.pdf

CS 229 Probability Review

cs229-prob.pdf cs229-gaussians.pdf cs229-more-on-gaussians.pdf

CS229 Linear Algebra Review and Reference

cs229-linalg.pdf

Statistics

STT1700 Introduction to Statistics

Chapiter 1: stt1700-ch01.pdf Chapiter 2: stt1700-ch02.pdf Chapiter 3: stt1700-ch03.pdf
Chapiter 4: stt1700-ch04.pdf Chapiter 5: stt1700-ch05.pdf Chapiter 6: stt1700-ch06.pdf
Chapiter 7: stt1700-ch07.pdf Chapiter 8: stt1700-ch08.pdf Chapiter 9: stt1700-ch09.pdf
Chapiter 10: stt1700-ch10.pdf cheatsheet: proba_stat_cheetsheet.pdf

STT2400 Linear Regression [Class notes UdeM Summer 2021(in English) with Melchior Basanze]

Chapiter 1: stt2400-ch01.pdf Chapiter 2: stt2400-ch02.pdf Chapiter 3: stt2400-ch03.pdf
Chapiter 4: stt2400-ch04.pdf Chapiter 5: stt2400-ch05.pdf Chapiter 6: stt2400-ch06.pdf
Chapiter 7: stt2400-ch07.pdf Chapiter 8: stt2400-ch08.pdf Chapiter 9: stt2400-ch09.pdf
Chapiter 10: stt2400-ch10.pdf Chapiter 11: stt2400-ch11.pdf

STT2700 Statistical concepts and methods[in French] with Kamel Belbahri

Theorems and Formulas: STT2700.pdf Chapiter 1: STT2700-ch01.pdf Chapiter 2: STT2700-ch02.pdf
Chapiter 3: STT2700-ch03.pdf Chapiter 4: STT2700-ch04.pdf Chapiter 5: STT2700-ch05.pdf Chapiter 6: STT2700-ch06.pdf
Chapiter 7: STT2700-ch07.pdf Chapiter 8: STT2700-ch08.pdf Chapiter 9: STT2700-ch09.pdf

*Math&Stat Cheatsheet

Probability cheatsheet made by Peleg Michaeli: cheetsheet-PelegMichaeli (Reference)
Probability cheatsheet made by William Chen: cheatsheet-WillChen (Reference)

Supervised Learning

CS229 Supervised Learning notes: supervised-learning.pdf
Machine Learning Model Review: Machine Learning models review

Linear Regression

scikit-learn user guide: Linear Regression scikit-learn API: Linear Regression
Machine Learning Coursera (Andrew Ng): Ex1 Linear Regression
Machine Learning Coursera (Andrew Ng): Ex5 Bias Vs Variance

Movie Recommendation

Reference: Machine Learning Coursera (Andrew Ng) Ex8
Code: ex8_MovieRecommendation.html


Logistic Regression

scikit-learn user guide: Logistic Regression scikit-learn API: Logistic Regression
Machine Learning Coursera (Andrew Ng): Ex2 Logistic Regression
Machine Learning Coursera (Andrew Ng): Ex3 Multiclass Classification
Logistic Regression from scratch: sample code with sigmoid and softmax as activation function


SVM

scikit-learn user guide: SVM scikit-learn API: SVM scikit-learn Tips on Practical Use: SVM
scikit-learn Kernal functions: SVM Kernal functions
SVM Mathematical formulation: SVM-Mathematical-formulation.pdf
CS229 SVM notes: CS229-SVM.pdf

SVM - SVC

scikit-learn user guide: SVC
scikit-learn API: Linear Support Vector Classification: LinearSVC C-Support Vector Classification: SVC
Machine Learning Coursera (Andrew Ng): Ex6 SVM ( reference )
Machine Learning Coursera (Andrew Ng): Ex6 E-Mail Spam Classification Filter ( Code made by kaleko: reference )

Implement Kernal SVM from scratch

Reference: Devoir 1 STT3795 @UdeM avec Guy Wolf [in French]
Code: Implement_Kernal_SVM_from_scratch.html
Explanation: explanation.pdf

SVM - SVR

scikit-learn user guide: SVR
scikit-learn API: Linear Support Vector Regression: LinearSVR Epsilon-Support Vector Regression: SVR


Naive Bayes

scikit-learn user guide: Naive Bayes scikit-learn API: sklearn.naive_bayes
CS229 Naive Bayes notes: naive-bayes.pdf

Beyasian Network



Decision Tree

scikit-learn user guide: Decision Trees scikit-learn API: sklearn.tree: Decision Trees
CS 229 Decision Tree notes: decision-tree.pdf


Random Forest

scikit-learn user guide: Ensemble methods , Random Forest
scikit-learn API: sklearn.ensemble: Ensemble Method , Random Forest Classifier , Random Forest Regressor
Random Forest Hyperparameter tuning example: sample code


Nearest Neighbors

scikit-learn user guide: Nearest Neighbors , scikit-learn API: sklearn.neighbors: Nearest Neighbors , KNeighborsClassifier , KNeighborsRegressor
Imputation for completing missing values using k-Nearest Neighbors: sklearn.impute.KNNImputer
KNN Hyperparameter tuning and model comparison example: sample code



Unsupervised Learning

Decomposition

PCA

scikit-learn user guide: Principal component analysis (PCA) , scikit-learn API: sklearn.decomposition.PCA
CS 229 Principal component analysis (PCA) notes: pca.pdf
Machine Learning Coursera (Andrew Ng): Ex7 PCA
PCA in finance: PCA Eigen Portfolio , Absoption Ratio via PCA ( Reference )
CS 229 Independent Components Analysis (ICA) notes: ica.pdf


Clustering

scikit-learn user guide: Clustering , scikit-learn API: sklearn.cluster: Clustering

K-means

scikit-learn user guide: K-Means , scikit-learn API: sklearn.cluster.KMeans
Machine Learning Coursera (Andrew Ng): Ex7 K-means
CS229 K-means notes: Kmeans.pdf


DBScan

scikit-learn user guide: DBScan , scikit-learn API: sklearn.cluster.DBSCAN


Linkage

scikit-learn - Comparing different hierarchical linkage methods on toy datasets: hierarchical linkage methods
SciPy API: scipy.cluster.hierarchy.linkage


BIRCH

scikit-learn user guide: BIRCH , scikit-learn API: sklearn.cluster.Birch


Manifold Learning

scikit-learn user guide: Manifold learning , scikit-learn API: sklearn.manifold: Manifold Learning

MDS & Isomap

scikit-learn user guide: Isomap , Multi-dimensional Scaling (MDS)
scikit-learn API: sklearn.manifold.Isomap sklearn.manifold.MDS

Python visualisation exercice with MDS and Isomap

Reference: Devoir 2 STT3795 @UdeM avec Guy Wolf [in French]
Code: MDS_Isomap_Ex.html


Mixtures of Gaussians and the EM algorithm

CS229 GMM & EM notes:
GMM-EM-1.pdf, GMM-EM-2.pdf, GMM-EM-Factor-Analysis.pdf

Ensemble

CS 229 Boosting notes: boosting.pdf

Adaboost

scikit-learn user guide: AdaBoost
scikit-learn API: AdaBoost Classifier , AdaBoost Regressor
Adaboost Hyperparameter Tuning example: sample code

Gradient Tree Boosting

scikit-learn user guide: Gradient Tree Boosting
scikit-learn API: Gradient Boosting Classifier , Gradient Boosting Regressor

LightGBM

LightGBM Documentation: LightGBM
LightGBM Hyperparameter Tuning example: sample code

XGBoost

XGBoost Documentation: XGBoost
XGBoost Hyperparameter Tuning example: sample code

Voting

scikit-learn user guide: voting classifier , voting regressor
scikit-learn API: voting classifier , voting regressor
harding voting: sample code
soft voting: sample code

Stacking

scikit-learn user guide: Stacking
scikit-learn API: Stacking Classifier , scikit-learn API: Stacking Regressor
Stacking: sample code


Neural Network

CS229 Deep Learning Intro notes: CS229-dl-intro.pdf
CS229 Deep Learning notes: CS229-dl.pdf
Build a basic deep learning network(Coursera, Andrew Ng): Building your Deep Neural Network.html

Forword Propagation

Machine Learning Coursera (Andrew Ng): Ex3 Neural Networks Forward Propagation
Deep Learning Coursera (Andrew Ng):
Forward Propagation
Forward

Back Propagation

Machine Learning Coursera (Andrew Ng): Ex4 Neural Networks Back Propagation
Deep Learning Coursera (Andrew Ng):
Backward Propagation
Backward-illustruation Backward

CNN

Build CNN model step by step (Coursera, Andrew Ng): cnn.html
CNN model application (Coursera, Andrew Ng): cnn application.html
CNN example for crop land detection from remote sensing data: my code for kaggle competition

cnn1
cnn2
cnn3

RNN

Build RNN and LSTM model step by step (Coursera, Andrew Ng): rnn and lstm.html
LSTM and bi-LSTM example for crop land detection from remote sensing data my code for kaggle competition

rnn1
rnn2
rnn3

Advanced Topics

Natural Language Processing

Kaggle Sentiment Analysis Tweets

NLP with BERT (Hugging Face Transformers) , NLP with LSTM , NLP with AutoGluon

Self-Supervised Learning

CS 229 Self Supervision: self-supervision.pdf

Reinforcement Learning

CS 229 Reinforcement Learning notes: reinforcement-learning.pdf

Reinforcement Learning in finance

Notes and codes
1. Discrete Black Scholes
2. QLBS Model Implementation
3. Fitted Q Iteration
Reference: Reinforcement Learning in Finance and Overview of Advanced Methods of Reinforcement Learning in Finance

Applications

Numpy, Pandas, Scikit-learn

Basic Pandas

Exercice1, Exercice2, Exercice3, Exercice4, Exercice5

Exploratory Data Analysis (EDA) and Visualisation

Using Analysis of variance (ANOVA) for categorical feature selection: code
Using correlation matrix (Heatmap) to see all the numerical correlation between features: code

Model Selection in general

CS229 notes: Bias-Variance, Error-Analysis, Metrics, Regularization
Machine Learning Coursera (Andrew Ng): Ex8 Anomaly Detection
Scikit-learn User Guide:
Cross-validation: evaluating estimator performance
Tuning the hyper-parameters of an estimator
Metrics and scoring: quantifying the quality of predictions
Validation curves: plotting scores to evaluate models

Feature engineering / Feature selection

Hyperparameter tuning

Plot Learning Curve

Metric and Scoring

Accuracy, F1, AOC/ROC comparison (in Chinese)

Data Preprocessing

Deal with imbalanced data

Application in finance

Portfolio Construction (Introduction to Portfolio Construction and Analysis with Python)
Advanced Portfolio Construction (Advanced Portfolio Construction and Analysis with Python)
Machine Learning For Asset Management (Python and Machine Learning for Asset Management)

Pytorch

CS224N Pytorch Tutorial
PyTorch CNN for MNIST (reference)
PyTorch RNN and LSTM for MNIST (reference)

MLOps with TensorFlow

FastAPI: Deploy a deep learning model
Journey through data: Birds, Cats and Dogs
Data Labeling
TFDV Exercice
Simple Feature Engineering
Feature Engineering Pipeline
Feature Selection
ML Metadata
Iterative Schema
Feature Engineering with Weather Data
Feature Engineering with Accelerometer Data
Feature Engineering with Images
Keras Tuner
TFX Tuner and Trainer
Classify Images of Clouds in the Cloud with AutoML Images
Manual Dimensionality
Algorithmic Dimensionality
Quantization and Pruning
Distributed Training
Knowledge Distillation
Distributed Multi-worker TensorFlow Training on Kubernetes
TensorFlow Model Analysis
TFX Evaluator
Fairness Indicators
Identifying Bias in Mortgage Data using Cloud AI Platform and the What-if Tool
Shapley Values
Permutation Feature Importance
Introduction Docker
TFS Docker
TF Serving
Autoscaling TensorFlow Model Deployments with TF Serving and Kubernetes
Apache Beam and Tensorflow
Implementing Canary Releases of TensorFlow Model Deployments with Kubernetes and Istio
Data Loss Prevention: Qwik Start - JSON
Kubeflow Pipelines
Architecture for MLOps using TFX, Kubeflow Pipelines, and Cloud Build
TFX on Google Cloud Vertex Pipelines