Skip to content

How To Analyze Multi-dimensional Time Series with mstump #305

Answered by seanlaw
Darveesh asked this question in Q&A
Discussion options

You must be logged in to vote

In your case, since you actually care about 1) including both dimensions and 2) looking for discords (i.e., both lat and lon have to deviate and not just one) then I think you want to do something like:

import numpy as np
import stumpy

T = np.random.rand(30000).reshape((2, 15000))
mp, idx = stumpy.mstump(T, m=50, discords=True)

discord_idx = np.argsort(mp[1, :], kind="mergesort")[::-1][0]  # Note that this is different from np.argpartition above
nearest_neighbor_idx = idx[1, discord_idx]

It's getting late here so hopefully I didn't misspeak in any of the above.

Replies: 11 comments 27 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
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
1 reply
@Darveesh
Comment options

Comment options

You must be logged in to vote
7 replies
@Darveesh
Comment options

@Darveesh
Comment options

@seanlaw
Comment options

@Darveesh
Comment options

@seanlaw
Comment options

Comment options

You must be logged in to vote
15 replies
@seanlaw
Comment options

@Darveesh
Comment options

@seanlaw
Comment options

@Darveesh
Comment options

@seanlaw
Comment options

Answer selected by Darveesh
Comment options

You must be logged in to vote
3 replies
@Darveesh
Comment options

@seanlaw
Comment options

@Darveesh
Comment options

Comment options

You must be logged in to vote
1 reply
@Darveesh
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #305 on December 22, 2020 19:27.