-
Notifications
You must be signed in to change notification settings - Fork 12
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
[DRAFT] Coherent random numbers #133
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…f variable between simulations. Experimenting in ART. Added logic to do transmission by acquiring node rather than edge. Slow, but rng safe. Discovered np.random.poisson in Gonorrhea set_prognosis - likely needs to be passed index of infecting agent, which I do not currently calculate. TODO!
* Redo transmission and identification of source * Added a poisson stream * Initializing intervention streams * Now set prognosis based on infector UID
…f of concept. Added a PrEP intervention that's like ART but modifies rel_sus.
* Breaking relationships on death
* Now calling finalize * ART reduces transmission * In ART and PrEP, changed capacity to coverage * Bug fix in networks * Updated "simple.py" example, need more testing
…mit that simple.py now runs two simulations and visualizes them side by side for each time step.
* Making ART reduce transmission * Added a simple "ladder" network in which 1<-->2, 3<-->4, ... for testing purposes * Improved graph visualization in simple.py, but will likely revert this to a simple test later. * Adding simple_ladder.py to run and plot the ladder network
* One member of each dyad is initally HIV+ * 50% of HIV+ are on ART
* Added checking to ensure a stream is not called twice in a row without a reset() or a step()
* Bug fix in test_stream.py
* Improving test for Stream object. * Improving streams.py: - Exception handling - reset() - Avoiding dependence of Stream on Sim object, now taking a Streams object and a block_size_object.
* module streams by layer, about to fix. * Checking for repeat stream names.
* Adding run_multistream.py to compare a simple HIV simulation with and without random stream coherence. * Stream block size now determined automatically * Stream seed offsets are now determined by hashing the stream name instead of sequentially. Thanks to @RomeshA for the suggestion. * New transmission calcs. Now determining acquisition probability across all layers and edge directions before using one random draw to determine acquisition. * This change makes it more challenging to determine whom the infection came from, that is currently a N^2 operation that needs optimization. * Adding ability to disable multiple streams through parameter named "multistream" * The ability switch from MultiStream (the default) to CentralizedStream adds some complexity. Consider removing this feature later. * As a result, everything now has parameters. * Fixed prevalence calculation to include only people who are alive in the denominator. * Additional error checking for streams, for example when the index array is boolean or empty. * The _pre_draw decorator is now applied to more MultiStream calls for error checking. * New CentralizedStream class that behaves like MultiStream but calls into a centralized random number generator. * Fixed a small bug in states.py regarding the size of grow(). * Improved stream and streams tests.
* renaming stable_monogamy.py to run_stable_monogamy.py * Adjusting test_base.py, it need some work to restore test_networks()
* Now using scipy to compute the distance matrix, it's faster * Added a normal draw to streams.
* run_multistream now compares multstrem on and off for either ART or PrEP * New run_sweep.py sweeps beta with multstream on or off
Interface still a bit messy. Need to fix Centralized RNG now.
* Catching edge cases * Update and cleanup of test scripts * Removing prep * Making art_efficacy a parameter * Removed step from negative binomial
* In states.py, added check for DynamicView
Much-improved v2 on the way. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Optionally use multiple random number streams and other tricks to maintain coherence between simulations.
Enabled by the
multistream
option and only fully compatible with thesimple_embedding
network.See #73 and #118.