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

Transition model: option for relaxing conditions when filtering agents to be sampled from #220

Open
hanase opened this issue Nov 26, 2019 · 3 comments

Comments

@hanase
Copy link
Contributor

hanase commented Nov 26, 2019

The transition model will not work well if the subset of agents to be sampled from is very small or even empty. Thus, an option of relaxing the filtering conditions (as present in Opus) would be very useful (e.g. if there are not enough households of the given characteristics within the given city, sample from the corresponding county or the whole region).

If nothing else, an option to use a user-defined callback function would help, together with letting the model to access the model configuration. It would replace/extend the filter_table call:

subset = util.filter_table(data, row, ignore={self._config_column})

@cvanoli
Copy link

cvanoli commented Dec 4, 2019

Hi @hanase!
We could create an optional feature with warnings printed when the effect of relaxing the filtering conditions acts. Building on that, I imagine that a callback function could be passed when subset of agents to be sampled from is very small or even empty.
Do you have something in mind you could describe about this?

@hanase
Copy link
Contributor Author

hanase commented Dec 9, 2019

Thanks @cvanoli! Yes - that would work. We usually relax the filtering if the number of agents to be sampled from is less than 1/3 of the target number. If a callback function is called when this kicks in that would work for us. Thanks!

@hanase
Copy link
Contributor Author

hanase commented Jun 6, 2023

Would it be possible to do anything about this issue? I see work on the transition model by @msoltadeo that may be related to a similar issue, but it doesn't seem to go in the direction that we need. A simple callback function that would allow us to implement the relaxing of the filtering condition would help a lot. Thank you.

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

No branches or pull requests

2 participants