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

UCR_UEA_datasets.baseline_accuracy fail for list_datasets=None #23

Closed
rth opened this issue Feb 27, 2018 · 3 comments
Closed

UCR_UEA_datasets.baseline_accuracy fail for list_datasets=None #23

rth opened this issue Feb 27, 2018 · 3 comments

Comments

@rth
Copy link
Contributor

rth commented Feb 27, 2018

(originally posted as part of #22 )

With Python 3 and tslearn 0.1.10.8 after loading all datasets, and running d.load_dataset('ItalyPowerDemand') I'm getting an error for,

>>> d.baseline_accuracy()
ValueError                                Traceback (most recent call last)
-> 1 d.baseline_accuracy()

~/anaconda2/envs/ts-env/lib/python3.6/site-packages/tslearn/datasets.py in baseline_accuracy(self, list_datasets, list_methods)
    149                 for m in perfs_dict.keys():
    150                     if m != "" and (list_methods is None or m in list_methods):
--> 151                         d_out[perfs_dict[""]][m] = float(perfs_dict[m])
    152         return d_out
    153 

ValueError: could not convert string to float: 

while d.baseline_accuracy('ItalyPowerDemand') works as expected. I guess some input validation is missing ..

@rtavenar
Copy link
Member

Thanks for reporting it!

I'll have a look when I have time, which is not right now unfortunately.

If someone feels like fixing that, it should not be too difficult (adding proper doctest would be a plus :) ), unless it is related to corrupted downloaded file, for which support is not satisfactory at the moment.

@rth
Copy link
Contributor Author

rth commented Feb 27, 2018

Thanks for your response.

it should not be too difficult (adding proper doctest would be a plus :) ), unless it is related to corrupted downloaded file, for which support is not satisfactory at the moment.

Since it's able to unzip the downloaded file and extract at least one dataset, I think it's probably the former.

rtavenar added a commit that referenced this issue Mar 1, 2018
…in UEA/UCR is hard-coded in the test, suggestions for improvement are welcome)
@rtavenar
Copy link
Member

rtavenar commented Mar 1, 2018

Fixed

@rtavenar rtavenar closed this as completed Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants