Skip to content

This project develops an activity recognition model for a mobile fitness app using statistical analysis and machine learning. By processing smartphone sensor data, it extracts features to train models that accurately recognize user activities.

Notifications You must be signed in to change notification settings

FaezehAbedi2023/Statistical-Analysis-in-Sensor-Data-Processing-with-Machine-Learning-Models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2

𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧

Activity context recognition plays a pivotal role in context-aware computing by enabling systems to automatically determine and infer contextual information from sensor-captured observations. This capability is crucial for developing applications that can dynamically respond and adapt to users' situations, leading to enhanced user experiences and functionalities. As a result, both industry and academia have increasingly focused on advancing context recognition technologies, leading to the rise of various intelligent applications, such as remote health monitoring, lifestyle tracking, and personalized intelligent services.

This project involves the development of an intelligent activity recognition model for a mobile fitness application. The goal is to automatically recognize users' activities using labeled historical activity context data provided by a fitness company. This data was collected from smartphone sensors, including orientation, rotation, accelerometer, gyroscope, magnetic, sound, and light sensors.

The dataset consists of low-level sensor data, making it challenging to derive meaningful inferences directly. Therefore, the project employs statistical feature extraction methods to extract valuable information from the raw data, which will be used to train machine learning models for context recognition.

The primary objective of this project is to deliver an activity recognition model for the fitness application, utilizing the activity context tracking dataset. The process includes analyzing, designing, implementing, and evaluating the model using various programming concepts and tools. These include custom module creation, function definitions, object-oriented programming (OOP), file processing, and exception handling. Additionally, scientific computing, data analysis, data visualization, and machine learning libraries such as NumPy, Pandas, Matplotlib, and Scikit-learn are leveraged to achieve the project's goals.

𝐂𝐨𝐫𝐞 𝐎𝐛𝐣𝐞𝐜𝐭𝐢𝐯𝐞𝐬

𝐚) 𝐄𝐱𝐩𝐥𝐨𝐫𝐚𝐭𝐨𝐫𝐲 𝐃𝐚𝐭𝐚 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬 (𝐄𝐃𝐀)

The objective is to thoroughly explore and analyze the dataset to uncover insights and prepare it for further analysis. Your tasks include:

1.𝐋𝐨𝐚𝐝𝐢𝐧𝐠 𝐚𝐧𝐝 𝐈𝐧𝐬𝐩𝐞𝐜𝐭𝐢𝐧𝐠 𝐭𝐡𝐞 𝐃𝐚𝐭𝐚𝐬𝐞𝐭:

Write code to load the dataset and examine its structure. Identify missing data points and apply appropriate cleaning techniques to handle them. Use relevant Python libraries for data preprocessing.

2.𝐃𝐞𝐬𝐜𝐫𝐢𝐩𝐭𝐢𝐯𝐞 𝐒𝐭𝐚𝐭𝐢𝐬𝐭𝐢𝐜𝐚𝐥 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬:

Implement a module for EDA that performs a descriptive statistical analysis of the dataset. Calculate and interpret key statistics such as mean, median, standard deviation, variance, minimum, maximum, skewness, and kurtosis. Select a range of variables of interest and analyze their distributions and relationships.

3.𝐕𝐢𝐬𝐮𝐚𝐥 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬:

Create visualizations to explore variable frequencies and dependencies using bar plots, grouped bar plots, pie charts, etc. Interpret these visualizations to draw meaningful conclusions about the dataset.

4.𝐂𝐥𝐚𝐬𝐬 𝐃𝐢𝐬𝐭𝐫𝐢𝐛𝐮𝐭𝐢𝐨𝐧 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬:

Analyze the dataset to determine if the classes are balanced by plotting the class distribution. If classes are imbalanced, apply at least one relevant technique to address this issue, ensuring a more balanced dataset for modeling.

5.𝐃𝐚𝐭𝐚𝐬𝐞𝐭 𝐒𝐩𝐥𝐢𝐭𝐭𝐢𝐧𝐠:

Split the cleaned dataset into training and testing subsets to prepare for machine learning model training.

𝐛) 𝐀𝐜𝐭𝐢𝐯𝐢𝐭𝐲 𝐂𝐥𝐚𝐬𝐬𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧

The goal of this task is to build and evaluate classification models using the dataset. Key steps include:

1.𝐌𝐨𝐝𝐞𝐥 𝐁𝐮𝐢𝐥𝐝𝐢𝐧𝐠:

Train a minimum of three classification models, such as Support Vector Machine, Random Forest Classifier, and Multi-Layer Perceptron Neural Networks.

2.𝐌𝐨𝐝𝐞𝐥 𝐄𝐯𝐚𝐥𝐮𝐚𝐭𝐢𝐨𝐧:

Evaluate each model using the test dataset and produce confusion matrices for all models. Compare model performance using metrics such as accuracy, precision, recall, and F1-Score.

3.𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧 𝐚𝐧𝐝 𝐑𝐞𝐜𝐨𝐦𝐦𝐞𝐧𝐝𝐚𝐭𝐢𝐨𝐧𝐬:

Analyze the evaluation results, draw conclusions about model performance.

𝐃𝐚𝐭𝐚𝐬𝐞𝐭 :

The activity_context_tracking_data.csv dataset is a comprehensive collection of sensor data designed for activity recognition and context tracking. This dataset is particularly useful for projects involving machine learning, data analysis, and sensor data processing.

𝐃𝐚𝐭𝐚𝐬𝐞𝐭 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰

The dataset consists of data collected from 7 different sensors, providing rich information about various physical movements and environmental conditions. The focus of this dataset is on the data from the sensors that have three axes: orientation, rotation, accelerometer, gyroscope, and magnetic sensors. Each of these sensors provides data along the x, y, and z axes, allowing for a detailed analysis of 3D motion and orientation.

Sensors Included Orientation Sensor (x, y, z):

Measures the device's orientation in space. Useful for determining the angle or position relative to a reference frame.

𝐑𝐨𝐭𝐚𝐭𝐢𝐨𝐧 𝐒𝐞𝐧𝐬𝐨𝐫 (𝐱, 𝐲, 𝐳):

Captures the rate of rotation around the device's x, y, and z axes. Essential for analyzing spinning or rotational movements.

𝐀𝐜𝐜𝐞𝐥𝐞𝐫𝐨𝐦𝐞𝐭𝐞𝐫 𝐒𝐞𝐧𝐬𝐨𝐫 (𝐱, 𝐲, 𝐳):

Measures the acceleration applied to the device, excluding the force of gravity. Useful for detecting motion, vibration, and tilt.

𝐆𝐲𝐫𝐨𝐬𝐜𝐨𝐩𝐞 𝐒𝐞𝐧𝐬𝐨𝐫 (𝐱, 𝐲, 𝐳):

Measures the device's rate of rotation around the three axes. Helps in understanding angular motion and orientation changes.

𝐌𝐚𝐠𝐧𝐞𝐭𝐢𝐜 𝐒𝐞𝐧𝐬𝐨𝐫 (𝐱, 𝐲, 𝐳):

Detects magnetic field strength along the x, y, and z axes. Useful for navigation and compass applications.

Technical Keywords

-Machine Learning

-Data Analysis

-Feature Extraction

-Classification Models

-Data Preprocessing

-Model Evaluation

-Statistical Analysis

-Data Visualization

-Scientific Computing

Sensor-Specific Keywords

-Orientation Sensor

-Rotation Sensor

-Accelerometer

-Gyroscope

-Magnetic Sensor

-Sensor Fusion

-3D Motion Analysis

-Environmental Sensing

-Wearable Technology

Libraries and Tools

-Python

-NumPy

-Pandas

-Matplotlib

-Scikit-learn

-Data Analysis Tools

-Programming Concepts

-OOP (Object-Oriented Programming)

-File Processing

-Exception Handling

Machine Learning Keywords

-Support Vector Machine (SVM)

-Random Forest

-Multi-Layer Perceptron (MLP)

-Neural Networks

-Supervised Learning

-Unsupervised Learning

-Model Training

-Model Evaluation

-Confusion Matrix

-Performance Metrics

Data-Specific Keywords

-Exploratory Data Analysis (EDA)

-Class Distribution

-Dataset Splitting Training and Testing Data Cleaning Missing Data Handling Imbalanced Data

About

This project develops an activity recognition model for a mobile fitness app using statistical analysis and machine learning. By processing smartphone sensor data, it extracts features to train models that accurately recognize user activities.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published