Classifies 7 object types (I–VII) from chronoamperometry (CA) CH1 pulse signals. Each class has 100 repeated pulses; the pipeline segments them, extracts pulse-shape features, trains an SVM, and produces a t-SNE cluster diagram and a confusion matrix.
.
├── main.py # entry point
├── requirements.txt
├── src/
│ ├── config.py # paths, class→file→sampling-rate mapping
│ ├── data_loader.py # UTF-16LE CSV reader, CH1 only
│ ├── segmentation.py # find_peaks-based 100-pulse cutter
│ ├── features.py # 11 per-pulse features
│ ├── classification.py # StandardScaler + SVM(RBF), 10-fold CV
│ ├── visualization.py # t-SNE + confusion-matrix figures
│ └── pipeline.py # orchestrates the full run
├── outputs/ # generated
│ ├── features.csv
│ ├── classification_report.txt
│ ├── tsne_cluster.png
│ ├── confusion_matrix.png
│ └── debug/segmentation_<class>.png # peak overlays for sanity-check
└── *.csv # 7 input recordings
pip install -r requirements.txt
python main.py- CH1 only (columns 0 and 1); UTF-16LE with a 6-line header.
- Sampling: 0.01 s for
25_*.csv, 0.1 s forhigh_*.csv/higher_*.csv(seesrc/config.py). - Segmentation cuts at midpoints between the 100 most prominent peaks, so every sample belongs to exactly one pulse and every window owns one peak.
- The confusion matrix is built from
cross_val_predict(held-out folds), never from training-set predictions. - All randomness pinned with
random_state=42.