You are browsing as a guest. Sign up (or log in) to start making projects!

10h 35m 44s logged

CRAMP DETECTOR (POWERTHRU) - DEVLOG 2—————————————————————————————————————————— To start, I used scikit - learn, Tensorflow, NumPy, pickle, and Pytorch to create a prototype for the BiLSTM model. I created two forms of the model: one that processes data that I generated (40,000 rows) and one that uses a WESAD dataset (https://ubi29.informatik.uni-siegen.de/usi/data_wesad.html). I had to modify some WESAD variables to fit my ideal sensors. Also, it uses Leave-One-Subject-Out (LOSO) cross validation. —————————————————————————————— ISSUES: My WESAD model is pretty bad (to what I expected as the other one was pretty good ~65 but that data is also generated so…) having accuracy of only 51.73 +/- 20.59%. But later when I combined oversampling + focal loss + class weights together over-corrected and overall accuracy dropped to ~45 +/- 20 (hoping on the plus side – how do you make it more reliable like less std_acc I swear it’s impossible). Thus, I think that it would be wise to turn oversampling off by default so that I have a gentler correction – if recall is too low with this combo, I will re-enable it or find some alt. Also, I created a diagnoses_subjects.py that expands the data of each subject to detect if there are any problems with the raw data in each. And alas, subject 14 (15% accuracy) had a eda_std roughly 15-35x lower than the reference subjects – nearly flatlined – leading me to believe that there was a loose / disconnected electrode. Subject 17 (17% accuracy) also had very low eda_std levels and an unusually narrow temp range – possibly due to physiological variability and not fully the model’s fault. So I added an EXCLUDE_SUBJECTS list that updates the loading of subjects to remove subjects with issues (e.g. 14 and maybe 17 if it doesn’t correct). —————————————————————————————————————————— I also create a dashboard.py script that uses plotly, streamlit, and pandas to create a visual and real-time dashboard for the levels. My parts are almost here (ESP32 mcu, way too basic dht11 temp, AD8232 emg, GSR sweat, MPU-6050 accel, Pancake Vibration motor, and batteries and supporting components) so in the meantime I used 2 interchangeable settings: Simulated random data mode, for demoing the UI without hardware (for now) and Live hardware mode; which uses ports connected over USB. I think the live visualization will be cool and will definitely transfer over to my app.————————————————————————————————————————Overall, this week was really about building the machine learning pipeline, diagnosing any quality issues, and creating software infrastructure that can (will) connect the hardware real-time interface (app). ——————————————————————————————————————— I am also really interested in building my own pcb – the idea just popped up while I was looking at other devlogs. Am I even able to integrate everything into one board? Idk, but if I remember I’ll do some research (Is Kicad the best?). Before I build anything I want to create a breadboard with each component to see if they fit together. Maybe I’ll test then run a mile then test again. Thanks for reading.—————————————————————————————————————————— Below I attached the dashboad, the result of my overcomplicated model, and the diagnose subjects that allowed me to eliminate 14 from my list. PS. I’m new to hardware related stuff – so if anyone is really skilled at it, could you help me bc I have a bunch of questions and am too lazy to watch youtube videos.

0
7

Comments 0

No comments yet. Be the first!