Machine Learning Study guides
14 Machine Learning (AI216) topics with plain explanations and practice questions. Free on BASMAGLY.
Machine Learning (AI216)
Lecture 1: Introduction
- What is Machine Learning?
Machine learning is the field of study that gives computers the ability to learn from data without being explicitly programmed for every rule. - Supervised vs Unsupervised vs Semi-supervised vs Reinforcement Learning
Machine learning systems are grouped by how much supervision they get: labelled data (supervised), no labels (unsupervised), a few labels (semi-supervised), or rewards (reinforcement). - Overfitting and Underfitting in Machine Learning
Overfitting means a model fits the training data very well but does not generalize to new data; underfitting means the model is too simple to learn the structure of the data. - Batch Learning vs Online Learning
Batch learning trains on all available data at once and then stops learning; online learning trains incrementally as data arrives, in single instances or mini-batches.
Lecture 3: Classification
- Confusion Matrix, Precision, Recall and F1 Score
A confusion matrix counts correct and wrong predictions per class; precision, recall and F1 score are built from its true and false positives and negatives. - ROC Curve and AUC Explained
The ROC curve plots the true positive rate (recall) against the false positive rate at every decision threshold; the area under it (AUC) summarises classifier quality in one number. - K-Fold and Stratified K-Fold Cross-Validation
K-fold cross-validation splits the training set into K folds, trains on K-1 of them and evaluates on the remaining fold, repeating K times so every fold is used once for evaluation. - Multiclass Classification: One-versus-One and One-versus-Rest
Multiclass classification assigns an instance to one of more than two classes; binary classifiers can be combined with the one-versus-rest (OvR/OvA) or one-versus-one (OvO) strategies. - MNIST Dataset and SGDClassifier Explained
MNIST is a set of 70,000 small images of handwritten digits, 28 x 28 pixels each (784 features), and a standard first dataset for classification; SGDClassifier is a simple binary classifier trained with stochastic gradient descent.
Lecture 4: Training Models
- Gradient Descent: Batch, Stochastic and Mini-batch
Gradient descent is a generic optimization algorithm that tweaks model parameters iteratively in the direction that lowers the cost function, until it reaches a minimum. - Linear Regression: Model, Cost Function and the Closed-Form Solution
Linear regression predicts a value as a weighted sum of input features plus a bias; training finds the parameters that minimise the mean squared error. - Regularization and Ridge Regression
Ridge regression is linear regression with an l2 regularization term added to the cost function, which keeps the weights small and reduces overfitting.
Lecture 2: End-to-End Project
- Feature Scaling: Min-Max Normalization vs Standardization
Feature scaling puts numeric attributes on a similar range. Min-max scaling squeezes values into 0 to 1; standardization gives zero mean and unit variance. - RMSE vs MAE: Regression Error Metrics and Norms
RMSE and MAE both measure the distance between the prediction vector and the target vector; RMSE is the l2 (Euclidean) norm and MAE is the l1 (Manhattan) norm.
BASMAGLY is an independent student project, not an official Delta University site. Check lectures and your instructor for the final word.