Comments (2)
-
you cannot currently do that: it loads all columns present in the input dataset if there are any rows for the current period in the input dataset. So you can have values for some periods but not others and some persons but not others but you need to have all input columns for each person that is present for a particular period. This is a stupid restriction but it is all due to the missing value problem (for int we cannot distinguish a value of -1 from a missing value/column for an individual, and it's even worse for booleans). When that problem will be fixed, extending the merge function (merge_arrays in data.py) to check for missing values should be relatively easy.
-
yes, values loaded at the start of a period simply replace the value from the previous period, but are not treated differently during the simulation, so they are modified. If you want to keep the input value if present, you have to explicitly test it with something like (assuming a float column):
# column == column is meant to filter out nan (missing) values
column_in_input: column == column and column != lag(column)
column: if(column_in_input, column, expr_to_compute_column)
from liam2.
Thank you.
About the second point, I switched to an other tactics. I created an entity futur which looks like my entity person. With a link 'in_futur' from person to futur id i can write:
column: if(in_futur.id > -1, in_futur.column, expr_to_compute_column)
from liam2.
Related Issues (20)
- add support for per-individual outcome value in choice
- make sure that broadcasting by axis name works
- investigate why results are different in 0.13 vs 0.12
- Add ability to sort data by period-id during import HOT 1
- Broken links in the doc HOT 4
- foreach function HOT 2
- Somehow allow access to aggregate results from other functions HOT 2
- implement coefficients_from context manager
- implement debug()
- Matching children with mothers (immigrants) HOT 1
- Add a qcut and/or digitize function HOT 3
- warn on align(constant) HOT 1
- implement One2ManyLink.any() and .all()
- add warning in the doc that logit_regr input values should be -720 < value < 31
- add runtime detection and warning if many logit_score values are outside "usable bounds"
- Improve error message to ease solving type error HOT 3
- avoid error message in min/max aggregates when group is empty HOT 2
- Better document cont_regr, clip_regr and log_regr
- getting aggregated values via Many2One links fails HOT 1
- add warning in the doc that lag/value_for_period with n > 1 is slow and duration is very slow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liam2.