{"id":20556518,"url":"https://github.com/somjit101/human-activity-recognition","last_synced_at":"2026-02-23T06:40:14.110Z","repository":{"id":179926691,"uuid":"413866329","full_name":"somjit101/Human-Activity-Recognition","owner":"somjit101","description":"This project is to build a model that predicts the human activities such as Walking, Walking Upstairs, Walking Downstairs, Sitting, Standing or Laying using readings from the sensors on a smartphone carried by the user.","archived":false,"fork":false,"pushed_at":"2025-04-14T04:24:44.000Z","size":61043,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T20:44:21.826Z","etag":null,"topics":["decision-tree-classifier","eda","feature-engineering","gradient-boosting-classifier","grid-search","human-activity-recognition","keras","logistic-regression","lstm","random-forest-classifier","rbf-kernel","scikit-learn","seaborn-plots","signal-processing","support-vector-classifier","support-vector-machine","t-sne","tensorflow","uci-har-dataset","uci-machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/somjit101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-10-05T15:05:07.000Z","updated_at":"2025-04-14T04:24:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"97a0a381-8642-4044-b98e-fad6a69b58f2","html_url":"https://github.com/somjit101/Human-Activity-Recognition","commit_stats":null,"previous_names":["somjit101/human-activity-recognition"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/somjit101/Human-Activity-Recognition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somjit101%2FHuman-Activity-Recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somjit101%2FHuman-Activity-Recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somjit101%2FHuman-Activity-Recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somjit101%2FHuman-Activity-Recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/somjit101","download_url":"https://codeload.github.com/somjit101/Human-Activity-Recognition/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somjit101%2FHuman-Activity-Recognition/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29739024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T04:51:08.365Z","status":"ssl_error","status_checked_at":"2026-02-23T04:49:15.865Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decision-tree-classifier","eda","feature-engineering","gradient-boosting-classifier","grid-search","human-activity-recognition","keras","logistic-regression","lstm","random-forest-classifier","rbf-kernel","scikit-learn","seaborn-plots","signal-processing","support-vector-classifier","support-vector-machine","t-sne","tensorflow","uci-har-dataset","uci-machine-learning"],"created_at":"2024-11-16T03:28:43.315Z","updated_at":"2026-02-23T06:40:14.065Z","avatar_url":"https://github.com/somjit101.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Human-Activity-Recognition\n\nThis project is to build a model that predicts the human activities such as Walking, Walking Upstairs, Walking Downstairs, Sitting, Standing or Laying using readings from the sensors on a smartphone carried by the user.\n\n## About the Dataset\n\nWe have used the **Human Activity Recognition Using Smartphones Data Set** on the **UCI Machine Learning Repository** which can be found [here](https://archive.ics.uci.edu/ml/datasets/human+activity+recognition+using+smartphones). \u003c/br\u003e\nThis dataset is collected from 30 persons(referred as subjects in this dataset), performing different activities with a smartphone to their waists. The data is recorded with the help of sensors (accelerometer and Gyroscope) in that smartphone. This experiment was video recorded to label the data manually.\n\n### How the Data was Recorded\n\nBy using the sensors(Gyroscope and accelerometer) in a smartphone, they have captured '3-axial linear acceleration'(_tAcc-XYZ_) from accelerometer and '3-axial angular velocity' (_tGyro-XYZ_) from Gyroscope with several variations. \n\n\u003e **prefix 't' in those metrics denotes time.**\n\n\u003e **suffix 'XYZ' represents 3-axial signals in X , Y, and Z directions.**\n\n## **Feature Names**\n\n1. These sensor signals are preprocessed by applying noise filters and then sampled in fixed-width windows(sliding windows) of 2.56 seconds each with 50% overlap. ie., each window has 128 readings. \n\n2. From Each window, a feature vector was obtianed by calculating variables from the time and frequency domain.\n\u003e In our dataset, each datapoint represents a window with different readings \n3. The acceleration signal was separated into Body and Gravity acceleration signals(___tBodyAcc-XYZ___ and ___tGravityAcc-XYZ___) using some low pass filter with corner frequecy of 0.3Hz.\n\n4. After that, the body linear acceleration and angular velocity were derived in time to obtian _jerk signals_ (___tBodyAccJerk-XYZ___ and ___tBodyGyroJerk-XYZ___). \n\n5. The magnitude of these 3-dimensional signals were calculated using the Euclidian norm. This magnitudes are represented as features with names like _tBodyAccMag_, _tGravityAccMag_, _tBodyAccJerkMag_, _tBodyGyroMag_ and _tBodyGyroJerkMag_.\n\n6. Finally, We've got frequency domain signals from some of the available signals by applying a FFT (Fast Fourier Transform). These signals obtained were labeled with ___prefix 'f'___ just like original signals with ___prefix 't'___. These signals are labeled as ___fBodyAcc-XYZ___, ___fBodyGyroMag___ etc.,.\n\n7. **These are the signals that we got so far :**\n\t+ tBodyAcc-XYZ\n\t+ tGravityAcc-XYZ\n\t+ tBodyAccJerk-XYZ\n\t+ tBodyGyro-XYZ\n\t+ tBodyGyroJerk-XYZ\n\t+ tBodyAccMag\n\t+ tGravityAccMag\n\t+ tBodyAccJerkMag\n\t+ tBodyGyroMag\n\t+ tBodyGyroJerkMag\n\t+ fBodyAcc-XYZ\n\t+ fBodyAccJerk-XYZ\n\t+ fBodyGyro-XYZ\n\t+ fBodyAccMag\n\t+ fBodyAccJerkMag\n\t+ fBodyGyroMag\n\t+ fBodyGyroJerkMag\n\n8. We can esitmate some set of variables from the above signals. ie., **We will estimate the following properties on each and every signal that we recoreded so far :**\n\n\t+ ___mean()___: Mean value\n\t+ ___std()___: Standard deviation\n\t+ ___mad()___: Median absolute deviation \n\t+ ___max()___: Largest value in array\n\t+ ___min()___: Smallest value in array\n\t+ ___sma()___: Signal magnitude area\n\t+ ___energy()___: Energy measure. Sum of the squares divided by the number of values. \n\t+ ___iqr()___: Interquartile range \n\t+ ___entropy()___: Signal entropy\n\t+ ___arCoeff()___: Autorregresion coefficients with Burg order equal to 4\n\t+ ___correlation()___: correlation coefficient between two signals\n\t+ ___maxInds()___: index of the frequency component with largest magnitude\n\t+ ___meanFreq()___: Weighted average of the frequency components to obtain a mean frequency\n\t+ ___skewness()___: skewness of the frequency domain signal \n\t+ ___kurtosis()___: kurtosis of the frequency domain signal \n\t+ ___bandsEnergy()___: Energy of a frequency interval within the 64 bins of the FFT of each window.\n\t+ ___angle()___: Angle between to vectors.\n\n9. We can obtain some other vectors by taking the **average of signals** in a single window sample. These are used on the 'angle() variable'\n\t+ gravityMean\n\t+ tBodyAccMean\n\t+ tBodyAccJerkMean\n\t+ tBodyGyroMean\n\t+ tBodyGyroJerkMean\n\n## **Output Labels**\n\n+ In the dataset, Y_labels are represented as numbers from 1 to 6 as their identifiers.\n\n\t- WALKING as __1__\n\t- WALKING_UPSTAIRS as __2__\n\t- WALKING_DOWNSTAIRS as __3__\n\t- SITTING as __4__\n\t- STANDING as __5__\n\t- LAYING as __6__\n\n## Train-Test Split\n\nThe readings from ___70%___ of the volunteers were taken as ___training data___ and remaining ___30%___ subjects recordings were taken for ___test data___\n\n## Dataset Location\n\n* All the data is present in 'UCI_HAR_dataset/' folder in present working directory.\n     - Feature names are present in 'UCI_HAR_dataset/features.txt'\n     - ___Train Data___\n         - [X_train](UCI_HAR_Dataset/train/x_train.txt)\n         - [subject_train](UCI_HAR_Dataset/train/subject_train.txt)\n         - [Y_train](UCI_HAR_Dataset/train/y_train.txt)\n     - ___Test Data___\n         - [X_test](UCI_HAR_Dataset/test/X_test.txt)\n         - [subject_test](UCI_HAR_Dataset/test/subject_test.txt)\n         - [Y_test](UCI_HAR_Dataset/test/y_test.txt)\n\n## Quick Overview of the Dataset\n\n* Accelerometer and Gyroscope readings are taken from 30 volunteers(referred as subjects) while performing the following 6 Activities.\n\n    1. Walking     \n    2. WalkingUpstairs \n    3. WalkingDownstairs \n    4. Standing \n    5. Sitting \n    6. Lying.\n\n\n* Readings are divided into a window of 2.56 seconds with 50% overlapping. \n\n* Accelerometer readings are divided into gravity acceleration and body acceleration readings,\n  which has x,y and z components each.\n\n* Gyroscope readings are the measure of angular velocities which has x,y and z components.\n\n* Jerk signals are calculated for BodyAcceleration readings.\n\n* Fourier Transforms are made on the above time readings to obtain frequency readings.\n\n* Now, on all the base signal readings., mean, max, mad, sma, arcoefficient, engerybands,entropy etc., are calculated for each window.\n\n* We get a feature vector of 561 features and these features are given in the dataset.\n\n* Each window of readings is a datapoint of 561 features.\n\n## Problem Statement\n\nGiven a new datapoint with all the sensor readings, we have to **predict the current Human Activity**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomjit101%2Fhuman-activity-recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomjit101%2Fhuman-activity-recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomjit101%2Fhuman-activity-recognition/lists"}