covid19ABM / comma

An agent-based microsimulation model to study mental health outcomes during covid-19 lockdowns
https://covid19abm.github.io/comma/
Apache License 2.0
2 stars 1 forks source link

Sampling function with the given weights learned from IPF as input #51

Closed jiqicn closed 1 year ago

jiqicn commented 1 year ago

The weights (probability of feature value combinations) are learned from the R code generated by @n400peanuts.

jiqicn commented 1 year ago

Hi @n400peanuts, I have a new branch that adds the function of sampling from the IPF weights. It works as expected as shown in the tutorial notebook.

I think the next step is to add an option to the populate function to allow the users to sample data from the IPF weights and do the rest. The code is easy to add, but I can't test it now, since we don't have the corresponding hypothesis matrices. So I suggest that we wait for the LA to send those matrices to us, and I add the rest of the code after that.

jiqicn commented 1 year ago

And I guess we will also need to map the column names and values in ipf_weights.csv that file to the values appearing in the hypothesis matrices.

n400peanuts commented 1 year ago

Hi @jiqicn! thanks a lot for this. I am going to look it up now, can I make changes in this branch or do you prefer to open a PR?

jiqicn commented 1 year ago

HI @n400peanuts, sorry for the late reply, but feel free to do it either way. And we can discuss the points that are not clear to you in our meeting later.