From 8de9efb0ac63f469f6c95ba2fd981986b04dd881 Mon Sep 17 00:00:00 2001 From: Skudalen Date: Thu, 8 Jul 2021 18:08:46 +0200 Subject: [PATCH] chore: add table of contents in README --- Neural_Network_Analysis.py | 3 ++- README.md | 17 +++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Neural_Network_Analysis.py b/Neural_Network_Analysis.py index 9fb53b8..9f6aaf8 100644 --- a/Neural_Network_Analysis.py +++ b/Neural_Network_Analysis.py @@ -11,7 +11,7 @@ import matplotlib.pyplot as plt # path to json file that stores MFCCs and subject labels for each processed sample DATA_PATH = str(Path.cwd()) + "/mfcc_data.json" -def load_data(data_path): +def load_data_from_json(data_path): with open(data_path, "r") as fp: data = json.load(fp) @@ -30,6 +30,7 @@ def load_data(data_path): return X, y + def plot_history(history): """Plots accuracy/loss for training/validation set as a function of the epochs :param history: Training history of model diff --git a/README.md b/README.md index 7391d0c..e5f246e 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,15 @@ Scripts to handle CSV files composed by 2 * 8 EMG sensors(left & right) devided ## Table of Contents -| File and classes | Description and help functions | -|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Handle_emg_data.py: - Data_container - CSV_handler - NN_handler | Handles, manipulates, and stores data for analysis. - Data_container is a class that describes the data for each subject in the experiment. Use __init__. - CSV_handler takes data from CSV files and places it in Data_container for each subject. Use load_data() to load csv data into data containers and add the containers to the CSV_handler's 'data_container_dict', indexed by subject number. Use get_data() to retrieve specific data. - NN_handler prepares data for further analysis in Neural Networks. This class has storage for this data and/or can save it to a json file. | -| Signal_prep.py | | -| Present_data.py | | -| Neural_Network_Analysis.py | | +| File and classes | Description and help functions | +|---|---| +| Handle_emg_data.py:

* Data_container
* CSV_handler
* NN_handler | Handles, manipulates, and stores data for analysis.

* Data_container is a class that describes the data for each subject in the experiment.
* CSV_handler takes data from CSV files and places it in Data_container for each subject.
Use load_data() to load csv data into data containers and add the containers to the
CSV_handler's 'data_container_dict', indexed by subject number. Use get_data() to retrieve
specific data.
* NN_handler prepares data for further analysis in Neural Networks. This class has storage
for this data and/or can save it to a json file. | +| Signal_prep.py | Does mapping to data and contains various functions. Among others, this contains wavelet,
MFCC, cepstrum and normalization. | +| Present_data.py | Contains plot and case functions. Case functions combines many elements from the code and
presents some results described. | +| Neural_Network_Analysis.py | Contains functions to load, build and execute analysis with Neural Networks. Main functions are
load_data_from_json(), build_model(), and main() | + + + + +