Efficient way to use subspace #143
Unanswered
LimYoonhwan
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I think the IntegratedLife model in lifelib is a good example how to split logic into multiple spaces. Input data, such as motality tables, model point tables, assumption tables(except for those that vary by sensitivity scenarios) are in spaces that are separate from the projection space. So they are executed only once. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I’m curious about how to efficiently utilize subspaces. I would like to generate results for five different lapse rate scenarios.
#103 Based on your question, I modeled the variables referencing other subspaces using _space.parent[i]. This approach nicely generated the values for the five scenarios across five subspaces.
However, since I’m running a somewhat heavy computation, this method seems to be similar in terms of speed and memory usage to running the five scenarios separately.
My model has over 400 variables, and since the variables that are not affected by lapse rate shocks should maintain their values from the initial run, I want to update only the changed variables. Do you have any recommendations for this? What I ultimately want is the total premium income for the 5 lapse rate × shock value combinations, and if there’s a faster way to calculate this, I’d love to know.
Thanks as always!
Beta Was this translation helpful? Give feedback.
All reactions