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

Handle unlabelled ts files #15

Merged
merged 2 commits into from
Jun 15, 2022
Merged

Handle unlabelled ts files #15

merged 2 commits into from
Jun 15, 2022

Conversation

gameldar
Copy link

Thanks for this code and the paper!

I found an issue when working with the ts file format - if I was using unlabelled data and so defined @classlabel false in the header section of the file then it would throw an exception when running. The issue is that the return from load_from_tsfile_to_dataframe will return a tuple when @classlabel is true, but just the dataframe when @classlabel is false. Therefore, when unpacking the expected from load_from_tsfile_to_dataframe it would throw an exception, and fall back to your implementation, however this assumes that the last column is a label and you end up with a truncated data set.

Gameldar added 2 commits June 15, 2022 22:03
The ts file format doesn't require labels to be defined. If they aren't
defined then it returns the dataset only. If they are defined in the
file, then then return is a tuple of the data and the labels. So test
the return value and handle the two cases.
If no labels are defined in the file, then this variable is no
initialised and causes an error at runtime.
Copy link
Owner

@gzerveas gzerveas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, this is useful! Thanks for taking care of this!

@gzerveas gzerveas merged commit fcd2a17 into gzerveas:master Jun 15, 2022
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