Skip to content

vl-pixel00/ML-Foundry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML-Foundry

A collection of machine learning exercises implementing core algorithms and computer vision techniques from scratch. Developed as part of postgraduate study in machine learning.

Overview

This repository contains hands-on exercises that build foundational understanding through implementation rather than relying on high-level libraries. Each notebook focuses on understanding the underlying mathematics and algorithms that power modern ML systems.

Exercises

Exercise 1: Facial Landmark Detection in Video

Analyses video sequences to detect the frame where a person's mouth is open widest using facial landmark detection.

Key Concepts:

  • Video frame extraction and processing with OpenCV
  • 68-point facial landmark detection using deep learning models
  • Feature-based distance calculations between facial points
  • Temporal analysis across video sequences

Applications: Emotion recognition, speech analysis, human-computer interaction

Exercise 2: Linear Regression with Gradient Descent

Implements linear regression from first principles to model the relationship between years of experience and salary.

Key Concepts:

  • Gradient descent optimisation
  • Manual implementation of parameter updates
  • Train-test split methodology
  • Model evaluation and visualisation

Critical Analysis: Includes identifying flaws in sequential data splitting versus random splitting for representative train-test sets.

Exercise 3: Logistic Regression for Binary Classification

Implements binary classification using logistic regression on synthetic data with 1,000 samples.

Key Concepts:

  • Sigmoid activation function
  • Binary cross-entropy loss
  • Training for 2,000 epochs tracking accuracy and loss
  • Visualisation of model convergence

Exercise 4: Image Denoising Filters

Compares mean filtering and median filtering techniques for image denoising on grayscale images.

Key Concepts:

  • Spatial filtering with 3×3 kernels
  • Mean filter: averaging pixel values
  • Median filter: replacing pixels with median values
  • Comparative analysis of denoising effectiveness

Exercise 5: Multi-Layer Neural Network for XOR

Solves the classic XOR problem using a multi-layer perceptron, demonstrating how neural networks handle non-linearly separable data.

Key Concepts:

  • Forward and backward propagation implementation
  • Two-layer architecture (3 input, 2 hidden, 1 output)
  • Backpropagation algorithm from scratch
  • Non-linear decision boundaries

Why It Matters: XOR is not linearly separable—demonstrating the necessity of hidden layers for complex problems.

Prerequisites

pip install -r requirements.txt

Getting Started

git clone https://github.com/vl-pixel00/ML-Foundry.git
cd ML-Foundry
jupyter notebook

Recommended Order

  1. Exercise 2 - Linear regression fundamentals
  2. Exercise 3 - Classification with logistic regression
  3. Exercise 5 - Neural networks and non-linear problems
  4. Exercise 4 - Image processing techniques
  5. Exercise 1 - Computer vision application

Educational Approach

  • From-scratch implementation for deeper understanding
  • Mathematical foundations with underlying equations
  • Visualisation for intuitive concept grasp
  • Critical analysis questions throughout

About

Collection of ML exercises implementing core algorithms from scratch: regression, classification, neural networks, and computer vision applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors