Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,5 @@ mlruns/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

data/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Please use `notebooks` folder to put all visualization or demo notebooks.
- To main project script :

```bash
poetry run demo
poetry run demo --input-path="data/EyeStateData.csv"
```

- To run unit tests :
Expand All @@ -144,7 +144,7 @@ poetry shell

```bash
# in a new terminal
mlflow ui
mlflow ui --port 5001
```

# Simply run following command in the root project dir
Expand Down
31 changes: 31 additions & 0 deletions features.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import numpy as np
import pandas as pd
from torcheeg import transforms

# Charger les données EEG depuis un fichier CSV
df = pd.read_csv('chemin/vers/votre_fichier.csv')
eeg = df.values # Convertir le DataFrame en tableau NumPy


# TRANFORMATION D'ENTROPIE DIFFÉRENTIELLE DE BANDE
# Appliquer la transformation BandDifferentialEntropy
transformed_eeg_entropy = transforms.BandDifferentialEntropy()(eeg=eeg)['eeg']
# Afficher ou utiliser les données EEG transformées par BandDifferentialEntropy
print("Transformed EEG with BandDifferentialEntropy:")
print(transformed_eeg_entropy)


# ANALYSE FRACTALE DE HIGUCHI
# Appliquer la transformation BandHiguchiFractalDimension
transformed_eeg_higuchi = transforms.BandHiguchiFractalDimension()(eeg=eeg)['eeg']
# Afficher ou utiliser les données EEG transformées par BandHiguchiFractalDimension
print("Transformed EEG with BandHiguchiFractalDimension:")
print(transformed_eeg_higuchi)


# DENSITÉ SPECTRALE DE PUISSANCE DE BANDE
# Appliquer la transformation BandPowerSpectralDensity
transformed_eeg_psd = transforms.BandPowerSpectralDensity()(eeg=eeg)['eeg']
# Afficher ou utiliser les données EEG transformées par BandPowerSpectralDensity
print("Transformed EEG with BandPowerSpectralDensity:")
print(transformed_eeg_psd)
1,809 changes: 1,809 additions & 0 deletions notebooks/eeg_prediction.ipynb

Large diffs are not rendered by default.

Loading