Skip to content
Discussion options

You must be logged in to vote

I got the same error when using non default n_shapelets_per_size . This should be fixed in the main branch, you can test it with python -m pip install "tslearn[all_features] @ https://github.com/tslearn-team/tslearn/archive/main.zip" on top of your existing environment.

Your save and load instructions are correct

shp_clf.to_json('shapelet_model.json')
shp_clf = LearningShapelets.from_json('shapelet_model.json')

should work . the _to_dict method is just intern machinery.

By the way, the size of your shapelets seems huge (shapelet_sizes = {300:4} means 4 shapelets of 300 samples), what's the shape of your dataset? You can have a look here for an example (not relevant for the save load prob…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by zillur01
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants