Skip to content

manelfornos/graphiloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphILoc

Traditionally, indoor positioning systems based on WiFi fingerprinting have relied on k-NN algorithms and, more recently, on deep learning models.

This repository contains the code for a framework developed to use Graph Neural Networks (GNNs) with both inductive and transductive learning schemes.

Transductive and inductive learning schemes for WiFi fingerprinting-based indoor positioning systems

In the transductive scheme, a single graph is created that includes all dataset splits (train, validation, and test), whereas in the inductive scheme, separate graphs are constructed for each split to prevent phenomena such as data leakage and to enable evaluation on unseen graphs without retraining the model each time.

The framework supports preprocessing of the original datasets using linear and power normalization, as well as dimensionality reduction via PCA. It also provides flexibility in constructing k-NN graphs, allowing selection of different distance metrics (Manhattan and Cosine) and the number of nearest neighbors k.

Transductive learning scheme

*The graphs were generated from the TUT5 dataset.

Inductive learning scheme

*The graphs were generated from the TUT5 dataset.

Pipeline

Summary of results

Results obtained after 10 runs using a random split of the training dataset each time (80/20).

Regression (Coordinate prediction)

Mean Position Error (m)
Dataset Best k-NN
(Optimized)
GraphSAGE
(Transductive)
GraphSAGE
(Inductive)
UJI17.337.36 ± 0.128.72 ± 0.20
UTS16.507.10 ± 0.127.39 ± 0.23
SAH15.935.85 ± 0.565.79 ± 0.97
TIE12.363.14 ± 0.853.34 ± 0.63
TUT14.436.46 ± 0.196.80 ± 0.21
TUT28.379.46 ± 0.629.46 ± 0.39
TUT37.767.65 ± 0.137.71 ± 0.25
TUT45.205.38 ± 0.095.71 ± 0.09
TUT55.226.19 ± 0.226.43 ± 0.26
SOD12.432.56 ± 0.102.59 ± 0.07
SOD21.541.62 ± 0.081.60 ± 0.11
SOD63.473.52 ± 0.113.32 ± 0.13

Classification (Building floor prediction)

Accuracy (%)
Dataset GraphSAGE
(Transductive)
GraphSAGE
(Inductive)
UJI195.28 ± 0.8094.96 ± 0.39
UTS195.90 ± 0.3595.59 ± 0.52
SAH188.40 ± 6.9281.60 ± 4.54
TIE16.60 ± 18.482.40 ± 3.75
TUT191.41 ± 0.8290.43 ± 0.41
TUT292.78 ± 0.9292.78 ± 2.23
TUT393.76 ± 0.3495.07 ± 0.24
TUT495.55 ± 0.4295.34 ± 0.50
TUT598.70 ± 0.5598.66 ± 0.80
SOD1100.00 ± 0.00100.00 ± 0.00

Repository structure

  • notebooks/:
    Jupyter notebooks used as the working environment.

    • evaluation.ipynb: Optimization, training and evaluation of graph neural networks.
  • src/:
    Python modules containing the core classes and functions used throughout the notebooks.

    • indoorloc_data.py: Manages data loading and processing, including graph construction.
    • indoorloc_optimizer.py: Manages model optimization.
    • indoorloc_trainer.py: Manages model training and evaluation.
    • indoorloc_models.py: Contains the GNN models.
    • indoorloc_viz.py: Manages the generation of plots.
    • indoorloc_enums.py: Contains constants and enums used in the other modules.

Requirements

Install all dependencies listed in requirements.txt:

pip install -r requirements.txt

About

A framework to train and evaluate graph neural networks for WiFi fingerprinting-based Indoor Positioning Systems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors