Human Activity Recognition
Classifying the physical activities performed by a user based on accelerometer and gyroscope sensor data collected by a smartphone in the user’s pocket. The activities to be classified are: Standing, Sitting, Stairsup, StairsDown, Walking and Cycling.
Install / Use
npx skills add ani8897/Human-Activity-RecognitionInstalls into whichever agent you are using.
README
Human-Activity-Recognition
Dataset link :
https://archive.ics.uci.edu/ml/datasets/Heterogeneity+Activity+Recognition
Libraries used :
Keras, Scikit-Learn, Numpy, Matplotlib and Pandas
File Structure:
There are 8 main files: 4 for data management, 4 for Machine learning codes and 1 for plotting the results.
Data management files:
1.As the dataset was very huge (~ 1.4 GB), it was partitioned into 13 files and the scripts 'compress_file.py' and 'compress2.0.py' were used to downsample the dataset stored in these 13 files to obtain 13 compressed files.
2.The scripts 'merge.py' and 'merge2.0.py' are used to merge the compressed files to obtain the dataset which was used for training. The 2.0 scripts were used for merging the accelerometer and gyroscope data.
Machine Learning codes:
1."main_NN.py" contains the Neural network implementation which was used on the accelerometer and gyroscope data separately.
2."main_RNN.py" contains the LSTM implementation which used on the merged data as well as the accelerometer and gyroscope data separately.
3."main.py" takes in the complete dataset (not the compressed dataset) and implements LSTM.
4."trainingPreprocessedData.py" takes in the dataset (Link:- https://archive.ics.uci.edu/ml/datasets/Smartphone-Based+Recognition+of+Human+Activities+and+Postural+Transitions) and outputs the result, this file was mainly created to see whether our LSTM model was good enough(The accuracy obtained from this preprocessed dataset was 91%).
Plotting:
Used for plotting the results obtained from "main_NN.py".
Model:
"model.h5" stores the final model to the problem.
NOTE:
Final code is run by 'main.py' and for this the dataset must be in the same folder and run the script using python3
Related Skills
mcp
Use the `mcp_perplexity-ask_perplexity_search` tools to answer questions. You should use this instead of the `web_search` tool because it is a lot more accurate.
practical-power-systems-synthesis
This skill enables synthesis in the domain of power-systems (engineering). It represents research-level-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform synthesis operations related to power-systems.
semi-supervised-optogenetics-testing
This skill enables testing in the domain of optogenetics (neuroscience). It represents intermediate-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform testing operations related to optogenetics.
data-mining-interpretation-fundamental
This skill enables interpretation in the domain of data-mining (data-science). It represents fundamental-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform interpretation operations related to data-mining.
