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

Longer InternalState window #6

Open
KristofferSkare opened this issue Mar 5, 2024 · 0 comments
Open

Longer InternalState window #6

KristofferSkare opened this issue Mar 5, 2024 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@KristofferSkare
Copy link
Collaborator

KristofferSkare commented Mar 5, 2024

It is not decided if this should be implemented!

During a meeting it was suggested that maybe we should expand the internal state to be able to store the state for a window into the past.

This could work by changing the internal state to instead of being a single vector be a matrix where the number of rows and columns are the window length and the number of states respectively. When the state is updated after the ml model is run the state would first be shifted one row over so that the oldest state is forgotten and the newest remembered state is duplicated in the first two rows. Then the first row in the state in overwritten by the state calculated from the current output from the ml model.

This would make it easy for the user of the tool to expand the state to be remembered for several time steps.

However, this is possible to do without implementing the feature by being clever with how the model is implemented and how the state is manipulated.

An example to illustrate:
Say we have two states s1 and s2. Where s1_i and s2_i represents the two states at time step i.
At time step 2 the current state could be:

state = [s1_1, s2_1, s1_0, s2_0]

The ml model could then manipulate the state inside, calculate s1_2 and s2_2 and output the state as follows:

output = [s1_2, s2_2, s1_1, s2_1]

The output can then be stored as state. This would result in the internal state always containing the state values for the previous two time steps. This could be expanded to an arbitrary number of states and window length. It is maybe a bit clunky to use, but it is possible.

The decision about if this feature should be implemented may depend on how often the user would want to store the state for a window in time.

@StephanieKemna StephanieKemna added question Further information is requested enhancement New feature or request labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants