Skip to content

Expose n_iter and n_samples parameters of idealized arc curve computations to FLUSS #601

Closed

Description

@fischja

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.

Activity

  1. seanlaw commented on May 11, 2022

    @seanlaw
    Contributor

    @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.

  2. fischja commented on May 12, 2022

    @fischja
    Author

    @seanlaw thank you for your quick reply - that indeed is a much more elegant solution.

  3. self-assigned this
    on May 12, 2022
  4. seanlaw commented on May 12, 2022

    @seanlaw
    Contributor

    that indeed is a much more elegant solution.

    @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.

  5. fischja commented on May 13, 2022

    @fischja
    Author

    @seanlaw sure thing :)

  6. locked and limited conversation to collaborators on May 13, 2022
  7. converted this issue into a discussion #604 on May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

wontfixThis will not be worked on

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions