You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose n_iter and n_samples parameters of idealized arc curve computations to FLUSS #601
Hi there, would it be possible to expose the n_iter and n_samples parameters of the _iac function to the top-level fluss function (or allow some kind of passthrough option)? The reason is that these parameters seem to heavily influence the runtime of fluss.
@fischja Thank you for your question and welcome to the STUMPY community.
would it be possible to expose the n_iter and n_samples parameters of the _iac function to the top-level fluss function (or allow some kind of passthrough option)?
Hmm, would something like this be sufficient for your needs?
import numpy as np
import stumpy
from stumpy.floss import _iac
T = np.random.rand(1000)
m = 50
mp = stumpy.stump(T, m)
L = 50
seed = 0
custom_iac = _iac(len(mp), bidirectional=True, n_iter=1000, n_samples=1000, seed=seed)
cac, regime_locations = stumpy.fluss(mp[:, 1], L=L, n_regimes=2, excl_factor=1, custom_iac=custom_iac)
So, here, you define a custom IAC and you can specify the n_iter and/or n_samples. Also, in case it is relevant, if the width of your idealized arc curve doesn't change then you can actually just re-use custom_iac without generating a new one each time. The only time you need to supply a new custom_iac is if your width changes.
@fischja You are too kind. It appears that "past Sean" had correctly anticipated this future need and designed the interface with this in mind. "future Sean" got lucky in this case 😄
If you don't mind, I would like to close this issue and move this over to our Discussion section.
Activity
seanlaw commentedon May 11, 2022
@fischja Thank you for your question and welcome to the STUMPY community.
Hmm, would something like this be sufficient for your needs?
So, here, you define a custom IAC and you can specify the
n_iterand/orn_samples. Also, in case it is relevant, if the width of your idealized arc curve doesn't change then you can actually just re-usecustom_iacwithout generating a new one each time. The only time you need to supply a newcustom_iacis if your width changes.fischja commentedon May 12, 2022
@seanlaw thank you for your quick reply - that indeed is a much more elegant solution.
seanlaw commentedon May 12, 2022
@fischja You are too kind. It appears that "past Sean" had correctly anticipated this future need and designed the interface with this in mind. "future Sean" got lucky in this case 😄
If you don't mind, I would like to close this issue and move this over to our Discussion section.
fischja commentedon May 13, 2022
@seanlaw sure thing :)