Skip to content

Commit

Permalink
✨ feat: Feature extraction with an identifier (#109)
Browse files Browse the repository at this point in the history
* 🚧 feat: create first rough draft

* ✨ feat: rename index axis on group_by calculation

* 🐛 fix: solve rename issue

* 🐛 fix: solve rename issue... again

* 🐛 fix: solve df form for group_by

* ♻️ refactor: clean up group_by calculate code

* 🎨 chore: format code

* 🚸 ux: filter out of bounds warning

* 🔥 chore: remove useless loc

* ✅ tests: add tests for new group_by functionality

* 🎨 chore: reformat code

* 🍱 chore: add dummy test data

* 🎨 tests: add basic group_by benchmark

* 📝 docs: update tsflex calculate docs

* 🚸 ux: warn users when parameters are not being used in group_by case

* 🎨 chore: format code

* 💨 Update tsflex/features/feature_collection.py

* 💨 tsflex/features/feature_collection.py

* ✅ tests: make nan test more robust

* 🧪 tests: add failing test for group_by with multiple feature descriptors

* 🐛 fix: make sure group_by works properly when multiple feature decsriptors are used

* 🧪 tests: add failing test for feature collection with nan values

* 🐛 fix: make sure nan values appear as separate row

* 📝 docs: update code documentation for _calculate_group_by

* ✨ feat: add group_by_consecutive function

* ♻️ refactor: rewrite group_by_calculate with new group_by_consecutive function

* ✅ tests: update groupby tests

* 🐛 fix: resolve nan bug

* ✅ tests: fix benchmarks

* 🎨 chore: format code

* 🚚 chore: replace csv file with parquet file

* ✅ tests: write some extra tests for group_by

* 🎨 chore: format code

* ✅ tests: update failing test

* 📝 docs: update groupby documentation

* 🖍️ fix code rendering in docs

* 🧪 tests: add test to support numeric indices

* ✨ feat: add support for numeric indices

* 📝 docs: fix markdown table rendering

* 🚸 ux: suppress useless warnings

* 📝 docs: add groupby example

* 🔍 adding test opts to pyproject

* 📝 docs: update code documentation

* 🧪 tests: add test for group_by_consecutive with series

* ✅ tests: add test for function warnings

* ✅ tests: add tests for failing groupby execution

* ♻️ refactor: change error throwing

* 🎨 chore: format code

* 📝 docs: update group by documentation

* ✅ tests: update failing tests

* 💚 ci: enable benchmarks

* ✅ tests: fix test for older python versions

* 🖊️ review code

* 🙈 fix test

* 🚧 add groupby_all support

* 🧹 check logging file handlers in advance

* ♻️ add group_by_all benchmark

* 🧹

* 🎉 extend tests

* 🧹 cleanup groupby nan behavior

* ✔️ test n_jobs for group_by behavior

* 🖊️ extend docs

* 🐛 remove file handler after feature calculation

* 🙈 manual instead of groupby logged window name

* 🖊️ review code

* 🕵️ test error when multiple windows in case of custom segments

* 🦘 test groupby logging

* 🙈 fix tests

* ⬆️ upgrade pytest-codspeed and update other deps

* 🙏 temporarily disable benchmark of groupby

* 🙈 lock pycatch dev depedency to avoid windows error

* 🙏

* 🔍 review README

* 🔍 review

* :mag; review

* 🔥 use tuple

* :broom

* 🕵️ code review with @jonasvdd

---------

Co-authored-by: Jonas Van Der Donckt <38005924+jonasvdd@users.noreply.github.com>
Co-authored-by: jonasvdd <jonvdrdo.vanderdonckt@ugent.be>
Co-authored-by: jvdd <boebievdd@gmail.com>
Co-authored-by: Jeroen Van Der Donckt <18898740+jvdd@users.noreply.github.com>
  • Loading branch information
5 people authored Feb 8, 2024
1 parent 31959d1 commit a6096a8
Show file tree
Hide file tree
Showing 14 changed files with 2,243 additions and 1,212 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
run: poetry install --all-extras

- name: Run benchmarks
uses: CodSpeedHQ/action@v1
uses: CodSpeedHQ/action@v2
with:
run: "poetry run pytest tests/benchmarks/ --codspeed"
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ clean:
rm -rf `find . -name __pycache__`
rm -rf .cache
rm -rf .pytest_cache
rm -rf .benchmarks
rm -rf *.egg-info
rm -rf .ruff_cache
rm -f .coverage
3 changes: 1 addition & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ This folder contains several examples, indicating (1.) the cross-domain applicab
## 0. general examples

**Paper example**: [tsflex_paper.ipynb](https://github.com/predict-idlab/tsflex/blob/main/examples/tsflex_paper.ipynb)
Example used in the tsflex paper. The example elaborates shows how tsflex can be applied for processing & feature extraction on multivariate (and even irregularly sampled) time series data.
<!-- TODO: add link to the paper -->
Example used in the [tsflex paper](https://www.sciencedirect.com/science/article/pii/S2352711021001904). The example shows how tsflex can be applied for processing & feature extraction on multivariate (and even irregularly sampled) time series data.

**Verbose example**: [verbose_example.ipynb](https://github.com/predict-idlab/tsflex/blob/main/examples/verbose_example.ipynb)
Example that elaborates in great detail (very verbose) the various functionalities of tsflex. In addition to processing & feature extraction, this example shows how to use the logging functionality, serialization, and chunking.
Expand Down
Binary file added examples/data/grouped_data.parquet
Binary file not shown.
Loading

0 comments on commit a6096a8

Please sign in to comment.