Skip to content

Projects and assignments from the Machine Learning for Networks course in the Computer Science degree at Universitat Pompeu Fabra (UPF)

Notifications You must be signed in to change notification settings

XavierCanadas/ML_for_networks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Machine Learning for Networks - Course Assignments

This course explores the application of Machine Learning techniques to wireless network problems, with a focus on Wi-Fi networks.

Students learn to apply both classical ML algorithms (Linear Regression, SVM, K-means) and advanced deep learning approaches (Neural Networks, LSTMs, Federated Learning) to solve real-world networking challenges such as performance prediction, pose recognition, indoor localization, channel allocation, congestion detection, and traffic forecasting.

The course combines theoretical foundations with hands-on implementation using industry-standard tools like PyTorch, scikit-learn, network simulators, and real datasets.

Repository Structure

SEMINARS/          # 5 introductory assignments on ML fundamentals
LABS/              # 3 applied projects with real-world datasets
requirements.txt   # Python dependencies
  • Seminars: Introduce ML concepts and tools (Linear Regression, SVM, K-means, Neural Networks, Federated Learning)
  • Labs: Apply learned techniques to solve practical Wi-Fi network problems

Technologies Used

  • Language: Python 3.8+
  • Environment: Jupyter Notebooks
  • ML Libraries: PyTorch, scikit-learn
  • Data Analysis: pandas, numpy, matplotlib, seaborn, plotly

Assignments

Seminars

Seminar 1

Introduction to Linear Regression using Wi-Fi simulation data. This seminar focuses on data preparation, analysis, and visualization techniques.

  • Loading and structuring datasets from text files
  • Computing statistical measures (mean, standard deviation)
  • Visualizing data distributions and building regression models

Seminar 2

Wi-Fi Pose Recognition using Support Vector Machines (SVM). This seminar explores classification techniques applied to Channel State Information (CSI) data.

  • Loading and visualizing skelleton points with pose labels
  • Analyzing CSI amplitude distribution across subcarriers
  • Building SVM classifiers with different preprocessing pipelines

Seminar 3

Introduction to K-means clustering for indoor localization using RSSI (Received Signal Strength Indicator) data from multiple Access Points.

  • Loading and analyzing RSSI measurements from WiFi Access Points
  • Visualizing 2D and 3D scatter plots of RSSI data by position
  • Implementing K-means clustering for position classification

Seminar 4

Building Feedforward Neural Networks (FNN) with PyTorch to predict Wi-Fi network performance (throughput and latency).

  • Performing correlation analysis between network features
  • Feature selection for optimal prediction
  • Designing and training neural networks for regression tasks

Seminar 5

Introduction to Federated Learning for collaborative model training across multiple clients without centralizing data with PyTorch.

  • Loading and preprocessing distributed client datasets
  • Implementing federated averaging algorithms
  • Training neural networks in a privacy-preserving distributed manner

Labs

Lab 1

Multi-Armed Bandits (MABs) for channel allocation in Overlapping Basic Service Sets (OBSS) using the Komondor Wi-Fi simulator.

  • Set up and run Wi-Fi simulations with Komondor
  • Implement and compare different MAB algorithms: ε-greedy, UCB, softmax, Thomson sampling, and random.
  • Analyze throughput performance and agent learning behavior

Lab 2

Congestion Detection in Wi-Fi networks using supervised learning. Training neural networks with Inter-Frame Space (IFS) histogram data from ns-3 simulator.

  • Analyzing IFS histograms and collision rates for network saturation
  • Implementing fully connected neural networks for binary classification
  • Applying K-Fold Cross-Validation for robust model evaluation

Lab 3

Time Series Forecasting with Federated Learning for predicting user load across multiple Wi-Fi Access Points using LSTM networks.

  • Analyzing and preprocessing time series data from multiple APs
  • Implementing LSTM models for network traffic prediction
  • Comparing centralized vs. federated learning approaches with performance metrics (MSE, MAE, MAPE)

Setup

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • Jupyter Notebook, VS Code with Jupyter extension or PyCharm.

Installation Steps

  1. Clone the repository

    git clone https://github.com/recuu7/AAX_SP.git
    cd AAX_SP
  2. Create a virtual environment (recommended)

    python -m venv venv
    source venv/bin/activate  # On macOS/Linux
    # or
    venv\Scripts\activate  # On Windows
  3. Install dependencies

    pip install -r requirements.txt
  4. Launch Jupyter Notebook

    jupyter notebook

    Then navigate to the desired seminar or lab folder and open the .ipynb file.

Additional Notes

  • Labs may require additional setup (e.g., Lab 1 uses the Komondor simulator).
  • Most notebooks are configured to run also on Google Colab with Google Drive mounted. However, all of them can run locally.

Course information

  • Enginyeria en Informàtica (Computer Science)
  • Universitat Pompeu Fabra (UPF)
  • Academic year: 2023-2024
  • Instructor:

Group Members

  • Xavier Cañadas
  • Sergi Recuero
  • Pau Reig

About

Projects and assignments from the Machine Learning for Networks course in the Computer Science degree at Universitat Pompeu Fabra (UPF)

Topics

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •