Skip to content

omaarelsherif/Human-Activity-Recognition-Using-Machine-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human Activity Recognition


➲ Project description

Human activity recognition is the problem of classifying sequences of data recorded by specialized harnesses or smart phones into known well-defined Human activities, The problem will be solved using K-Nearest-Neighbor (KNN) algorithm where we will train the model on dataset of collection of human activities in order to classifying it.


➲ Prerequisites

This is list of required packages and modules for the project to be installed :

  • Python 3.x
  • Pandas
  • Numpy
  • Seaborn
  • Matplotlib
  • Scikit-learn

Install all required packages :

 pip install -r requirements.txt


➲ The Dataset

Human activites dataset contain about 564 columns to describe human current activity
and a target column which describe what's the current state of a human.

Dataset features and target :

Dataset head :


➲ Coding Sections

In this part we will see the project code divided to sections as follows:

  • Section 1 | Data Preprocessing :
    In this section we aim to do some operations on the dataset before training the model on it,
    processes like :

    • Loading dataset
    • Check missing values and dataset statistics
    • Visualize some dataset columns in order to have some insights for better understanding
    • Apply dimensionality reduction using PCA algorithm in order to transform the data from a high-dimensional space into a low-dimensional space
    • Scale the dataset
    • Split the dataset into training and testing sets
  • Section 2 | Model Creation :
    The dataset is ready for training, so we create a K-nearest Neighbors "KNN" model using scikit-learn and thin fit it to the data.

  • Section 3 | Model Evaluation :
    Finally we evaluate the model by getting accuracy, classification report and confusion matrix.


➲ Installation

  1. Clone the repo
    git clone https://github.com/omaarelsherif/Human-Activity-Recognition-Using-Machine-Learning.git
  2. Run the code from cmd
    python human_activity_recognation.py


➲ Output

Now let's see the project output after running :

Dataset head :


Dataset statistics :


Activites :


Accuracy and classification report :


Model confusion matrix :


➲ References

These links may help you to better understanding of the project idea and techniques used :

  1. Human Activity Recognition research : https://bit.ly/384uASG
  2. Models for Human Activity Recognition : https://bit.ly/3zhW57a
  3. Standard Scaler : https://bit.ly/3mt2r04
  4. Principal Component Analysis (PCA) : https://bit.ly/3knqZVD
  5. K-Nearest Neighbors (KNN) : https://bit.ly/2XI2Ukq
  6. Model evaluation : https://bit.ly/3B12VOO


➲ Contact

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages