This folder contains tools for analyzing physiological data extracted from PPG signals and correlating them with DASS-21 scores.
analysistools.py: The main analysis script. It performs statistical analysis, correlation checks, and generates visualizations.converter.py: A utility script to convert the raw Excel file (Ekstraksi Fitur.xlsx) into the CSV format required by the analysis tool.Ekstraksi_Fitur_Converted.csv: The input data file foranalysistools.py.
Make sure you have the required Python libraries installed:
pip install pandas matplotlib seaborn numpy openpyxlIf you have your data in an Excel file named Ekstraksi Fitur.xlsx, run the converter to generate the CSV:
python3 converter.pyNote: Check converter.py to ensure HEADER_ROW matches your Excel file structure.
Run the main analysis script:
python3 analysistools.pyThe script will create two folders with the results:
- Correlation Matrix Heatmap:
correlation_matrix_heatmap.png - Scatter Plots:
analysis_plots_part_X.png(Scatter plots of each metric vs DASS-21 score with regression lines) - Box Plots:
box_plots_part_X.png(Distribution of metrics grouped by severity)
- Correlation Results:
correlation_results.csv(Correlation coefficients for all metrics) - Grouped Statistics:
grouped_statistics.csv(Mean and Standard Deviation for each metric grouped by Severity) - Sorted Data:
sorted_analyzed_data.csv(The processed dataset sorted by DASS-21 score)
The tools analyze 24 physiological metrics including:
- Heart Rate (HR)
- Respiratory Rate
- HRV Metrics (SDNN, RMSSD, pNN50, etc.)
- Frequency Domain Metrics (LF, HF, LF/HF Ratio)
- Non-linear Metrics (SD1, SD2)
DASS-21 scores are categorized as:
- Normal: 0-7
- Ringan: 8-9
- Sedang: 10-12
- Parah: 13-16
- Sangat Parah: >16