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

time-series batch / whole-series feature calculation #77

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jonasvdd
Copy link
Member

@jonasvdd jonasvdd commented Oct 13, 2022

Objectives:

Functionality

Available options:

  1. introduce a new method to the FeatureCollection (as done here):
    • advantages
      • Explicit method definition, less confusion for end-users
    • disadvanges
      • A new method is introduced / less uniform interface to perform computation
  2. Perform unsegmented feature computation when all window and/or stride are NOT set.
    • advantages
      • more homogenous interface
    • disadvanges
      • somewhat more implicitness
        code example:
 # NOTE: window and stride parameters are omitted. 
fc = FeatureCollection(
    FeatureDescriptor(
        function = np.mean,
        series_name="Value",
    )
)

# Uses the whole (unsegmented) series of `data` to 
# calculate the features. method remains the same.
fc.calculate(data=df, return_df=True)
  1. Perform unsegmented feature computation when all windows are set to -1
  2. a combination of (2.) and (3.)

As for now, this is performed by introducing the calculate_unsegmented method to the FeatureCollection:

Bug fixes

  • fix the window_idx="end" and (window-size > data-range) bug

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 95.91837% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.12%. Comparing base (9787fc0) to head (0f71518).
Report is 78 commits behind head on main.

Files Patch % Lines
tsflex/features/feature_collection.py 88.88% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
- Coverage   98.22%   98.12%   -0.11%     
==========================================
  Files          22       22              
  Lines        1238     1278      +40     
==========================================
+ Hits         1216     1254      +38     
- Misses         22       24       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants