GithubHelp home page GithubHelp logo

im-ethz / flirt Goto Github PK

View Code? Open in Web Editor NEW
56.0 5.0 21.0 302.53 MB

Are you ready to FLIRT with your wearable data?

Home Page: https://flirt.readthedocs.io

License: Other

Python 15.96% Jupyter Notebook 84.04%
acc eda hrv ai wearables machine-learning health flirt ubiquitous-computing empatica-e4

flirt's People

Contributors

adrian-lison avatar masquare avatar sfsouthpalatinate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flirt's Issues

NumbaDeprecationWarning

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.

EDA features not being extracted

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)

image

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!

Project unmaintained?

Is the project being maintained?

There have been open issues and pull requests for a long time.

Unattributed Source Code?

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

Terminology for "lineintegral" feature

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.