Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented features #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
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)
3 changes: 3 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[virtualenvs]
prefer-active-python = true
in-project = true