Contributors: Nicolas Smits, Bassem Mikhail
Projects completed for COMP 551: Introduction to Machine Learning (McGill University).
This repository contains four end-to-end machine learning assignments covering regression, neural networks, computer vision, and transformer-based NLP. Each project includes clean, reproducible implementations with supporting experiments and analysis.
Topic: Linear Regression with Radial Basis Functions
This project explored the relationship between model complexity, bias–variance tradeoffs, and regularization. A linear model was enhanced with Gaussian RBF features to capture nonlinear structure in synthetic data.
Key components:
- Implementation of RBF feature generation
- L1 (Lasso) and L2 (Ridge) regularization
- Train/validation/test splitting
- k-fold cross‑validation for hyperparameter selection
- Analysis of underfitting vs. overfitting through learning curves
The assignment emphasized how regularization stabilizes training and improves generalization in high‑dimensional feature spaces.
Datasets: OrganAMNIST (medical images)
Models: Scratch‑built MLP, CNN (PyTorch), ResNet (pretrained)
This project implemented and compared multiple neural architectures on grayscale medical image classification:
- Multilayer Perceptron (from scratch)
Built using NumPy with manual backprop and SGD - Convolutional Neural Network (PyTorch)
Implemented using standard conv/pool blocks - ResNet Transfer Learning
Fine‑tuning a pretrained model to evaluate benefits of learned visual representations
Experiments examined:
- Architectural depth and width
- Data preprocessing and augmentation
- Regularization (dropout, weight decay)
- Optimization strategies and convergence behavior
Dataset: GoEmotions (27 emotion labels)
Models: Naive Bayes, Softmax, Random Forest, XGBoost, BERT
This NLP project investigated approaches to emotion classification, comparing traditional ML baselines with transformer‑based language models.
Highlights:
- Text cleaning, tokenization, and label preprocessing
- Baseline classifiers using TF‑IDF features
- Fine‑tuning BERT for multi‑label emotion detection
- Exploration of attention mechanisms and contextual embeddings
- Evaluation using macro/micro F1, precision, and recall
The results demonstrate the substantial performance advantage of pretrained transformers over classical bag‑of‑words methods for nuanced sentiment analysis.
COMP-551-ml-projects/
│
├── Assignment2/
│ └── ... code, figures, reports
├── Assignment3/
│ └── ... image models & analysis
├── Assignment4/
│ └── ... NLP models & BERT fine-tuning
└── README.md