Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **Training Data Collection and Processing**
- ecg-data-collection.ino:
- - sample the serial output of the ad8232 (which is just a signal conditioner) for five seconds at ???(200/400?)hz,
- - convert serial output to .txt over USB with putty
- - convert the .txt file to multiple .tsv files
- data generation:
- - use the christov r-peaks detector to generate a list of r-peaks
- - calculate ibi
- - calculate sympathetic and parasympathetic power
- - calculate SDNN
- - repeat for all samples
- - cluster into two clusters with k-means (sympathetic and parasympathetic power)
- - calculate distance from baseline centroid for all data points
- - if the point is in the cluster for detected anxiety, then multiply by a weight, which is determined by the anxiety cluster centroid's distance from the baseline cluster's centroid
- - anxiety index = normalize to a float between 0 and 1 -> {weighted distance + difference between baseline SDNN and SDNN}, where the weighted distance comprises 75% of the index, while the difference between the baseline SDNN and SDNN comprises 25% of the index
- todo:
- - implement error handling in all programs
- - anxiety index gen implementation (ensure that the program can loop through all uploaded .tsv files and generate an index for each of them)
- - hardware setup + putty setup + delete all test variables and files
- - actual data collection
- - change all test variables in all algorithms
- - pass the data through to obtain x-y pairs
- - convert all tsv files to csv files for easier data management when training?
- - implement a load_dataset() function (loads the x-y pairs as numpy arrays)m
- issues:
- - ad8232 sampling rate
- - tflite support for artemis
- (e0103.tsv)
- Low Frequency Power (Sympathetic): 0.6927324238837926
- High Frequency Power (Parasympathetic): 0.0008289976394698316
- Parameters: [0.69273242 0.000829 ]
- (e0110.tsv)
- Low Frequency Power (Sympathetic): 0.6927322301682437 <-
- High Frequency Power (Parasympathetic): 0.0008293845888830577 <- extremely subtle differences
- Parameters: [0.69273223 0.00082938]
- Distance list: [4.3273035749211477e-07, 0.0, 7.15861207908303e-07]
- Weighted distance list: [4.327306060073341e-07, 0.0, 7.158616190243757e-07]
- Pre-index: 5.569940729620437
- Pre-index: 2.0
- Pre-index: -17.749491096196778
- Anxiety Index (0): 2.227976291848175
- Anxiety Index (1): 0.8
- Anxiety Index (2): -7.099796438478711
- ecg0: [0.6927324238837926, 0.0008289976394698316]
- SDNN: 11.04285415915946
- ecg1: [0.6927322301682437, 0.0008293845888830577]
- SDNN: 14.61279445604929
- ecg2: [0.6927325506297615, 0.0008287444625794123]
- SDNN: 34.36228626810769
Advertisement
Add Comment
Please, Sign In to add comment