Classical Machine Learning Units
Classical Machine Learning Units
- Basic Skills
- python
- matplotlib
- pandas, data processing
- numpy
- Matrix operations
- Cover above with various projects in class
- Measures for model evaluation
- Categorical model evaluation - accuracy, precision, recall
- Quantitative model evaluation - $r^2$, sum of squared errors
- Linear Regression
- Mathematical background
- Introduce scikit-learn 1D data and multi-dimensional data
- Non-linear regression (via data preprocessing)
- Subset selection (Forward and Backward)
- Lasso and Ridge Regression (regularization techniques – reducing variance and overfitting)
- Basic Concepts covered:
- Test and training data.
- Under and over-fitting.
- Model evaluation
- Possibly ways of dealing with missing data
- Logistic Regression
- First classification problem - contrast with regression
- Cover the mathematical model
- Introduce AROC curve and “cutoff” values for classification
- Introduce the math of the logistic curve and its derivative (which will be used with NN)
- Data Preprocessing
- One hot encoding
- Text? TF-IDF? Text embeddings? (would introduce vector cosine distance)
- Image formats? (RGB, BGR, conversion) Processing? (sharpen, blur, resample)
- Principal Component Analysis
- Uses some linear algebra concepts
- reduces dimensionality of data
- important for large datasets
- Project idea: compare PCA with forward/backward subset selection for regression
- Decision Trees
- This is another classification problem
- Work with preprocessing categorical data, missing data
- Pruning methods (reducing variance and overfitting)
- Connect to subset selection and PCA (reducing input dimension)
- Random Forests? Other variants?(here or later)
- Support Vector Machines
- Classification by embedding in high dimensional space
- Quick overview of math interpretation (splitting data with a plane that maximizes distance between points)
- Talk about different kernel functions (provide math for kids who care)
- Naive Bayes Classifier and k-nearest neighbors (? optinal ?)
- Easy to understand and even code from scratch
- Gives good baseline on learnability of concepts
- Extension: Gaussian Mixture models, etc.
- Meta-techniques
- Ensemble methods (combining models)
- Bootstrapping and Boosting
- Adaboost, xgboost, others?
- Things to fit in when applicable above
- Cross-validation
- Hyperparameter grid search techniques
This is a good 2 quarters maybe more (3-5 lessons per unit, give or take?). Then we do neural net stuff in the spring. This follows (mostly) the order of https://github.com/AET-CS/opencv-machine-learning and lessons are available here for each topic.
Notice once we get going with unit 3, there’s not much real math. Mainly knowing how to interpret results. Some techniques will have optional math explanations. Some (like lasso and ridge regression) are very easy to explain if they understand normal regression, for example.
some recurring ideas:
- selecting a subset of your features that matter most
- preprocessing data and feature sets
- missing data
- model analysis!
- hyperparameters
- ethical interpretations