University of Bahrain
University of Bahrain College of Information Technology Department of Computer Engineering
Senior Project 2026 · ITCE 497 / ITNE 402

ENHANCED WI-FI-BASED INDOOR
LOCALIZATION
SYSTEM USING MACHINE LEARNING

A fingerprinting-based indoor positioning system combining K-Nearest Neighbors regression with Gaussian kernel weighted fusion for accurate indoor positioning.

View Results Methodology
10.34m Mean Positioning Error
6.82m Median Error
80 PCs from 520 WAP Features
19.9k Training Samples

System Pipeline

📡
RSSI Collection
UJIIndoorLoc
520 WAPs
19,937 samples
🔧
Preprocessing
−100→−110 dBm
clip [−104, 0]
StandardScaler
📐
PCA Reduction
520 → 80 PCs
85–90% variance
retained
🏢
Stratified Training
Per building
per floor KNN
GridSearchCV
⚖️
Gaussian Fusion
Distance-based
adaptive σ
weighted avg
📍
Location Output
Lat/Long (m)
Pseudo-Mercator
coordinates
Offline Phase

Training & Model Building

  • Load and inspect UJIIndoorLoc dataset structure and quality
  • Replace undetected WAP values (100 → −110 dBm), clip and normalize
  • Apply PCA: reduce 520 features to 80 principal components
  • Train separate KNN regressors per (building, floor) pair
  • Optimize K via 5-fold cross-validation with GridSearchCV
  • Serialize scaler, PCA, and all models with Joblib
Online Phase

Model Prediction

  • Acquire new collected RSSI measurements
  • Apply identical preprocessing pipeline for consistency
  • Transform with saved PCA to match training feature space
  • Select per-building/floor model using building & floor labels
  • Compute Euclidean distances to all training fingerprints
  • Fuse top-K neighbors via Gaussian kernel weighting → final location

Performance Results

Mean Squared Error (m²)
125.68 Baseline KNN
124.49 Gaussian Fusion
↓ 0.95% improvement
Root Mean Squared Error (m)
11.21 Baseline KNN
11.16 Gaussian Fusion
↓ 0.45% improvement
Mean Positioning Error (m)
10.40 Baseline KNN
10.34 Gaussian Fusion
↓ 0.58% improvement
Median Positioning Error (m)
6.94 Baseline KNN
6.82 Gaussian Fusion
↓ 1.73% improvement
75th Percentile Error (m)
12.92 Baseline KNN
12.83 Gaussian Fusion
↓ 0.70% improvement
Accuracy Within 2 Meters (%)
17.91% Baseline KNN
18.00% Gaussian Fusion
↑ 0.09pp improvement
Mean Positioning Error — Comparison with Related Work (meters, lower is better)
Matrix Mult.
20.24m
Grad. Boost
16.14m
CNN
12.79m
Neural Net
13.56m
Our Model
10.34m

Design Highlights

Dataset: UJIIndoorLoc

Collected at Universitat Jaume I (2013) across ~110,000 m² campus with 3 multi-floor buildings. Features 19,937 training samples and 1,111 validation samples, captured with 25 Android devices by 20+ users in diverse environments including corridors, offices, labs, and classrooms.

Gaussian Kernel Fusion

Each neighbor i is assigned weight wᵢ = exp(−dᵢ²/2σ²) where σ is computed adaptively as max(median(d₁…dₖ), 0.5). By assigning exponentially higher weights to the nearest fingerprints in RSSI signal space, the system accurately reflects the spatial correlation between adjacent locations — preserving the natural relationship that physically close positions share similar signal patterns.

Strengths

  • Interpretable, mathematically explainable predictions
  • Tolerant of sparse WAP coverage where 55 WAPs have 0% coverage
  • Rare high-variance WAPs leveraged as localization landmarks
  • Per-building/floor models eliminate cross-floor confusion

Limitations & Future Work

  • Limited generalization to new environments
  • RSSI instability from walls, people, and multipath propagation
  • KNN distance computation grows with database size
  • Advanced feature engineering for WAP selection using mutual information and ANOVA F-score ranking
  • Generalization of the Model and Algorithmic Comparison by trying different algorithms such as RF, SVM, and Neural Network
  • Real-time implementation and adaptive fingerprinting on mobile devices with live Wi-Fi measurements

Project Team

ZA
Zainab Abbas Isa Jasim
202207120
Network Engineering
RH
Rabab Husain Abdulaal
202208680
Computer Engineering
GM
Ghadeer Mohammed Zuhair
202204965
Network Engineering
Dr. Reham N. Almesaeed
Department of Computer Engineering · College of IT · University of Bahrain

Contact Information

✉️
Email
support@knnweightfusion.com

For project inquiries, collaboration opportunities, or technical discussions regarding our Wi-Fi indoor localization system.

Send a Message
We'll get back to you as soon as possible.