https://github.com/rednafi/indoor-movement-prediction
Predicting user movements from temporal streams of RSS (Radio Signal Strength) measured between the nodes of a WSN (Wireless Sensor Network WSN)
https://github.com/rednafi/indoor-movement-prediction
classification ensemble-learning machine-learning plotly-express timeseries-analysis
Last synced: 3 months ago
JSON representation
Predicting user movements from temporal streams of RSS (Radio Signal Strength) measured between the nodes of a WSN (Wireless Sensor Network WSN)
- Host: GitHub
- URL: https://github.com/rednafi/indoor-movement-prediction
- Owner: rednafi
- License: mit
- Created: 2019-04-22T09:17:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:42:57.000Z (over 3 years ago)
- Last Synced: 2025-09-17T08:47:12.813Z (9 months ago)
- Topics: classification, ensemble-learning, machine-learning, plotly-express, timeseries-analysis
- Language: Jupyter Notebook
- Homepage:
- Size: 30.9 MB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Indoor Movement Prediction
Predicting user movements from temporal streams of RSS (Radio Signal Strength) measured between the nodes of a WSN (Wireless Sensor Network WSN). A static version of the jupyter notebook can be seen [here.](https://nbviewer.jupyter.org/github/rednafi/indoor-movement-prediction/blob/master/notebooks/.ipynb_checkpoints/%20Indoor%20User%20Movement%20Prediction%20from%20RSS%20Data%20Set%20-checkpoint.ipynb)
[](https://archive.ics.uci.edu/ml/datasets/Indoor+User+Movement+Prediction+from+RSS+data)
[](https://www.python.org/)
[](https://github.com/rednafi/indoor-movement-prediction/blob/master/LICENSE)
[](https://github.com/python/black)
## Dataset Description
### Summary
This dataset represents a real-life benchmark in the area of Ambient Assisted Living applications. The binary classification task consists in predicting the pattern of user movements in real-world office environments from time-series generated by a Wireless Sensor Network (WSN).
Input data contains temporal streams of radio signal strength (RSS) measured between the nodes of a WSN, comprising 5 sensors: 4 anchors deployed in the environment and 1 mote worn by the user. Data has been collected during user movements at the frequency of 8 Hz (8 samples per second). In the provided dataset, the RSS signals have been rescaled to the interval [-1,1], singly on the set of traces collected from each anchor.
Target data consists in a class label indicating whether the user's trajectory will lead to a change in the spatial context (i.e. a room change) or not. In particular, the target class +1 is associated to the location changing movements, while the target class -1 is associated to the location preserving movements.
The measurement campaign involved a number of 3 different environmental settings, each of which comprises 2 rooms (containing typical office furniture) separated by a corridor. A sketch of the common setup considered is provided by the Figure in file **MovementAAL.jpg**.
Each file in the provided dataset contains data pertaining to one temporal sequence of input RSS data (1 user trajectory for each file). The dataset contains 314 sequences, for a total number of 13197 steps. The dataset can be found [here](https://archive.ics.uci.edu/ml/datasets/Indoor+User+Movement+Prediction+from+RSS+data). For more information on the dataset, visit this [link](http://wnlab.isti.cnr.it/paolo/index.php/dataset/6rooms).

### Attribute Information
Data is provided in comma separated value (csv) format.
* **Input:** Input RSS streams are provided in files named **MovementAAL_RSS_SEQID.csv**. Here, *IDSEQ* is the progressive numeric *sequence ID*. In each file, each row corresponds to a time step measurement (in temporal order) and contains the following information:
*RSS_anchor1, RSS_anchor2, RSS_anchor3, RSS_anchor4*.
* **Target:** Target data is provided in the file **MovementAAL_target.csv**. Here, each row in this file contains:
*sequence_ID*, *class_label*.
* **Dataset Grouping:** Data is grouped in 3 sets. File **MovementAAL_DatasetGroup.csv**, provides information about such data grouping. Each row in this file contains:
*sequence_ID*, *dataset_ID*.
* **Path Grouping:** Users' movements are divided in 6 prototypical paths. File **MovementAAL_Paths.csv** provides information about data grouping based on path type. Here, each row in this file contains:
*sequence_ID*, *path_ID*.
## Project Organization
### Folder Structure
```
.
├── data
│ ├── indoor_movement.csv
│ ├── indoor_movement_red.csv
│ └── MovementAAL
│ ├── dataset
│ │ ├── MovementAAL_RSS_1.csv
│ │ ├── MovementAAL_RSS_2.csv
│ │ ...........................
│ │
│ ├── dataset_description.txt
│ ├── groups
│ │ ├── MovementAAL_DatasetGroup.csv
│ │ └── MovementAAL_Paths.csv
│ ├── MovementAAL.jpg
│ └── README.txt
├── LICENSE
├── notebooks
│ └── Indoor User Movement Prediction from RSS Data Set .ipynb
├── processed_data
│ ├── indoor_movement.csv
│ ├── indoor_movement_red.csv
│ └── RSS Output.png
├── .dockerignore
├── .gitignore
├── Dockerfile
├── README.md
├── docker-compose.yml
└── requirements.txt
```
### Workflow
```
Dataset
- Preprocessing
- Concatenating Target Column with the Inputs
- Adding Ids to Each Row
- Adding Groups to Each Row
- Adding Time based on 8Hz Sampling Frequency
- Exploratory Data Analysis
- Time Series Visualization
- Histogram Plots
- Dimensionality Reduction
- PCA (Principle Component Analysis)
- UMAP (Uniform Manifold Approximation and Projection)
- Movement Classification & Prediction
- Baseline Model
- Classification
- 75-25% Train-Test Split
- Classification via Random Forest
- Training
- Evaluation
- Validation
- Ensemble Method for Improving Prediction
- Feature Extraction
- Tsfresh feature extraction
- Important feature selection
- Classification
- 75-25% Train-Test Split
- Classifier Ensembling Via Soft Voting (Decision Tree, KNN,
Gradient Boosting,Random Forest, Adaboost)
- 10-fold Stratified Cross Validation
- Training
- Evaluation
- Validation
- UMAP of the Extracted Features
- Decision Boundary Plotting
```
## Installation
* You'll need [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/) installed on your machine
* Clone the repo
```bash
git clone git@github.com:rednafi/indoor-movement-prediction.git
```
* Run the container
```bash
docker-compose up -d
```
* Go to your browser and open the following URL (Your token might vary. Inspect that using
`docker logs indoorapp-cont` command)
```
http://127.0.0.1:8888/?token=9143b78935c03b423190348826bfd9194beabfdb802563b8
```
* Stop the container
```bash
docker-compose down
```