im-ethz / flirt Goto Github PK
View Code? Open in Web Editor NEWAre you ready to FLIRT with your wearable data?
Home Page: https://flirt.readthedocs.io
License: Other
Are you ready to FLIRT with your wearable data?
Home Page: https://flirt.readthedocs.io
License: Other
After reviewing your code more it appears that most of the functionality claimed in the paper is missing.
https://www.sciencedirect.com/science/article/pii/S0169260721005356
Are there plans to fix this?
mypy
throws an error whenever I am importing flirt
as there are no type stubs available
Python 3.11.3
Numba: 0.57.1
flirt/lib/entropy/fractal.py:106: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0.
Hello,
I'm having trouble extracting EDA features with the WESAD dataset and flirt
. Here is a reprex:
import pathlib
import zipfile
import tempfile
import flirt
def test_extract_features_e4(WESAD_zip_path, subject_index=0, hrv=True, eda=True):
'''
args:
WESAD_zip_path: str path to your WESAD zip file
subject_index: int which subject to extract, between 0 and 14
hrv: bool passed to get_features_for_empatica_archive -> hrv_features
eda: bool passed to get_features_for_empatica_archive -> eda_features
'''
with zipfile.ZipFile(WESAD_zip_path, mode="r") as archive:
e4s=[x for x in archive.namelist() if "E4_Data" in x]
target=e4s[subject_index]
with tempfile.TemporaryDirectory() as tmpdirname:
print("extracting ", target)
archive.extract(target, path=tmpdirname)
e4_zip = [x for x in pathlib.Path(tmpdirname).rglob('*.*')].pop()
features = flirt.simple.get_features_for_empatica_archive(e4_zip, 60, 10, hrv_features=hrv, eda_features=hrv, acc_features=False)
archive.close()
return features
## here, put the path to your full WESAD zip file download; no need to extract
download_path = pathlib.Path("~/Downloads/WESAD.zip").expanduser()
# run flirt
test_extract_features_e4(download_path, subject_index=0, hrv=False)
Output:
extracting WESAD/S10/S10_E4_Data.zip
Received empty input features, returning empty df
Similarly, if I unzip the files and run the EDA module directly:
eda = flirt.reader.empatica.read_eda_file_into_df("/Users/tinashetapera/Downloads/WESAD/S8/S8_E4_Data/EDA.csv")
flirt.get_eda_features(eda['eda'], 250, 5)
I downloaded the dataset from here and it should be identical to the paper. Colleagues of mine have successfully extracted both HRV and EDA features with no trouble.
I believe it may be a Mac M2 issue as there doesn't seem to be any other reasonable explanation, but please let me know what configurations you'd like to check against.
Setup:
Macbook Air M2
OSX Ventura 13.0
miniconda: conda 4.14.0
Python: Python 3.10.6
flirt
:
pip show flirt
Name: flirt
Version: 0.0.2
Summary: Wearable Data Processing Toolkit
Home-page: https://github.com/im-ethz/flirt
Author: ETH Zurich โ Chair of Information Management
Author-email:
License: MIT
Location: /opt/homebrew/Caskroom/miniconda/base/envs/hinf5300/lib/python3.10/site-packages
Requires: astropy, cvxopt, ishneholterlib, joblib, numba, numpy, pandas, scipy, tqdm
Required-by:
Thanks in advance for any help you can provide!
Is the project being maintained?
There have been open issues and pull requests for a long time.
Hi,
I was looking at your code base today and wanted to use your __cvx_eda implementation. After looking around online I found what looks to be an original implementation which isn't attributed in your code. Furthermore, the original source uses a GPL license which I believe asks that people who use the code also use a GPL license in addition to attributing the code. Anyway, I could be missing something so I just wanted to point it out on here.
Thanks
Heyhey,
This issue was initiated by a discussion in which Felix was confused by usage of the phrase "lineintegral" instead of just an integral. As we understood it, line integral is usually over multi-dimensional field/vector/line or along a curve. In the flirt package, I think the integral is only calculated for 1D lines right? (HRV, EDA, ACC-x, ACC-y, ACC-z, ACC-l2, etc.), so we think it should be called integral instead of line integral. Let me know if this is not the case, then I don't have to update my figures ;)
Cheers,
Eva
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.