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

Improve inter-eventblock-distances in sequences #110

Open
ReneSkukies opened this issue Oct 15, 2024 · 3 comments
Open

Improve inter-eventblock-distances in sequences #110

ReneSkukies opened this issue Oct 15, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ReneSkukies
Copy link
Member

Request to improve control over inter-eventblock-distances.

In #104 event sequences are added to UnfoldSim. These are implemented expressed as for example {SR}-blocks, such that in this case an S event is always followed by an R event. You can add an underscore to the formula {SR_}, to indicate that there should be no overlap between one SR-block (i.e. pair) and the next.

It would be handy to have more control over the time between those blocks. For example, one could implement a keyword that takes in a distribution from which to pull the distances between the last event of one block and the first of the next. But I am also not sure how this is currently implemented and how viable that is

@ReneSkukies ReneSkukies added the enhancement New feature or request label Oct 15, 2024
@behinger
Copy link
Member

Iirc currently I take the size of the longest component/basis function and multiply it times 2 or 3. We could either allow to specify a factor, or specify a distance in samples. What would you prefer?

@ReneSkukies
Copy link
Member Author

I can see merit in both:

A factor might be more intuitiv to the user. Takes away having to think about and calculate the samples from latencies (and thus a possible bug)

Samples is a better way to control the exact overlap/ distance ('cause I don't think there is an easy/ direct way to get the length of the components/ basis functions/ ERPs). But maybe I think samples is a better way, now that I think about it...

How would you handle implementing a random jitter? Cause from the above it seems both options would be a static distance

@behinger
Copy link
Member

  • samples it is then. By default we do 2*maxlength
  • Easy way is: maxlength([c1,c2,c3]) - but not sure it is exported
  • random jitter: you just provide a function that fullfills the following interface:

(rng::AbstractRNG,n)::Vector{Int} with size n.

e.g. rand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants