-
Notifications
You must be signed in to change notification settings - Fork 325
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 LSTMDetection and TSFCDetection Metrics #487
Comments
Good catch. Thanks for reporting this @ca692526 I think you are right. The Time Series Detection metrics seem to require In any case, to make things easier and confirm that this is it, would you mind pasting here the complete traceback of the error, so we can see where it came from? |
Thanks for looking into this @csala. Below is the traceback for LSTMDetection. ValueError Traceback (most recent call last) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/sdmetrics/timeseries/detection.py in compute(cls, real_data, synthetic_data, metadata, entity_columns) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/sdmetrics/timeseries/detection.py in _build_x(data, transformer, entity_columns) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/pandas/core/frame.py in groupby(self, by, axis, level, as_index, sort, group_keys, squeeze, observed, dropna) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/pandas/core/groupby/groupby.py in init(self, obj, keys, axis, level, grouper, exclusions, selection, as_index, sort, group_keys, squeeze, observed, mutated, dropna) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/pandas/core/groupby/grouper.py in get_grouper(obj, key, axis, level, sort, observed, mutated, validate, dropna) ValueError: No group keys passed! |
Below is the traceback for TSFCDetection @csala ValueError Traceback (most recent call last) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/sdmetrics/timeseries/detection.py in compute(cls, real_data, synthetic_data, metadata, entity_columns) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/sdmetrics/timeseries/detection.py in _build_x(data, transformer, entity_columns) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/pandas/core/frame.py in groupby(self, by, axis, level, as_index, sort, group_keys, squeeze, observed, dropna) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/pandas/core/groupby/groupby.py in init(self, obj, keys, axis, level, grouper, exclusions, selection, as_index, sort, group_keys, squeeze, observed, mutated, dropna) ~/.cache/pypoetry/virtualenvs/venv/lib/python3.7/site-packages/pandas/core/groupby/grouper.py in get_grouper(obj, key, axis, level, sort, observed, mutated, validate, dropna) ValueError: No group keys passed! |
Until we fix this issue, a possible workaround might be to add an entity column to both the real and synthetic data. Eg. You can add an |
Seems like this issue is a dupe of the SDMetrics issue: sdv-dev/SDMetrics#77 I'll close this off in favor of SDMetrics one, since it is closer to where the error is actually happening. The issue also has some more discussion on how we're thinking about sequential metrics -- especially when there is a single sequence vs. multiple sequences. |
Environment Details
SDV version: 0.10.0
Python version: 3.7.10
Operating System: Windows
Error Description
When executing LSTMDetection and TSFCDetection time series evaluation metrics the following error is presented:
"ValueError: No group keys passed!"
The PAR model was not trained with any entity columns or context columns. The PAR model was only trained with the sequence index. i.e model = PAR(sequence_index="timestamp")
model.fit(df) # Train the model
Does the model have to have an entity column to utilize the metric functions?
Steps to reproduce
The text was updated successfully, but these errors were encountered: