Skip to content

xenakistheo/TMA4180

Repository files navigation

Support Vector Machines

This code base contains implementations and experiments related to Support Vector Machines (SVMs) as part of the course TMA4180 - Optimisation at the Norwegian University of Science and Technology (NTNU).

The authors of this project are:

  • Henrik S. Grønlund
  • Magnus U. Rønneseth
  • Emilio Lombardo
  • Theodoros Xenakis

Spring 2025.

Code Structure

This folder contains the code used for the numerical applications of Support Vector Machines (SVMs). There are three notebooks with the actual (graphical) implementations, and several python files with other helping code. The notebooks are:

  • kernelAnalysis.ipynb: This notebook contains the analysis of the kernels used in the report. It contains the code for the SVMs in $\mathbb{R}^2$ and the analysis of the kernels used.
  • breastCancer.ipynb: This notebook contains the creation of SVM's for prediction on the breast cancer dataset.
  • timeComplexity.ipynb: This notebook contains the analysis of time-complexity for varying size of the sample spaces.

The python file where the SVM algorithms are implemented lies in svmAlgorithms.py. dataset_gen.py contains data for generation of datasets, and kernel.py contains the kernels used in the project.

Running the Code

Prerequisites

  • Python 3.10+
  • pip or pipenv

Installation

Clone the repository:

git clone https://github.com/your-username/your-repo.git
cd your-repo

Create a virtual environment:

python3.10 -m venv .venv

Activate the virtual environment:

  • Windows:
    .venv\Scripts\activate
  • macOS/Linux:
    source .venv/bin/activate

Upgrade Pip:

python -m pip install --upgrade pip

Add Gitignore:

echo "*" > .venv/.gitignore

Install the dependencies:

pip install -r requirements.txt

About

Projects in TMA4180 - Optimisation. Spring 2025.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •