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

Stochastic transitions #474

Draft
wants to merge 52 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
baeafb3
Set up stochattic probability-based transitions to allow for measurin…
Rowanmh Oct 11, 2021
4037277
add stochastic_rounding
Rowanmh Oct 12, 2021
425223d
Random seed for parset sampling, random.randn -> default_rng sampling
Rowanmh Nov 5, 2021
e3c6285
default_rng for programs/covouts also
Rowanmh Nov 5, 2021
6cbcb6f
Update project.py
Rowanmh Nov 5, 2021
752154a
Update project.py
Rowanmh Nov 5, 2021
3965276
Pass the same random number generator within a given model run rather…
Rowanmh Nov 7, 2021
ac4e458
Consistent seeding
Rowanmh Nov 7, 2021
1e7c94f
Pass generators within kwargs, and handle that option in parallel_pro…
Rowanmh Nov 7, 2021
930c10e
Optional acceptance criteria for sampled_sims - to ensure that sample…
Rowanmh Nov 7, 2021
0b4e493
Update project.py
Rowanmh Nov 7, 2021
0e3bb45
Acceptance criteria evaluated during runtime or postprocessing as app…
Rowanmh Nov 8, 2021
224c2a6
Merge branch 'develop' into stochastic_transitions
Rowanmh Feb 22, 2023
211a7fd
Fix ResidualJunctionCompartment not applying stochasticity correctly …
kelvinburke Mar 1, 2023
98b7274
Whitespace
Rowanmh Mar 3, 2023
b955a10
Merge pull request #473 from atomicateam/stochastic_transitions_fix
Rowanmh May 10, 2023
3188662
Merge remote-tracking branch 'origin/master' into stochastic_transitions
RomeshA Jun 18, 2023
33b9da7
Merge pull request #486 from atomicateam/develop
RomeshA Sep 26, 2023
d1839ee
Merge pull request #488 from atomicateam/develop
RomeshA Oct 20, 2023
a545715
Add rng_sampler=None to Programset.sample()
kelvinburke Nov 1, 2023
61ffc2d
Merge branch 'develop' into stochastic_transitions
Rowanmh Nov 1, 2023
da06bbb
Merge branch 'stochastic_transitions' of github.com:atomicateam/atomi…
RomeshA Nov 2, 2023
72f231d
Keep "Output" column in worksheet and don't group by output, just pri…
kelvinburke Nov 2, 2023
76a1dba
Also make sure the required_width of a column fits the column name
kelvinburke Nov 2, 2023
1ee101c
Add "constant" to reserved_keywords
Rowanmh Nov 6, 2023
efcf4c2
Merge remote-tracking branch 'origin/databook_fixes' into stochastic_…
Rowanmh Nov 10, 2023
eb464d0
Merge remote-tracking branch 'origin/dont-group-results-excel' into s…
Rowanmh Nov 10, 2023
70f34cd
Use ax = fig.gca() instead of ax = plt.gca() so that you can have mul…
kelvinburke Nov 24, 2023
02c4cb9
Improve error message when different y-labels
kelvinburke Nov 24, 2023
17efbee
Merge pull request #495 from atomicateam/develop
RomeshA Feb 5, 2024
269f712
Add test_tox_markovchain.py
kelvinburke Apr 11, 2024
c9dfa22
Merge remote-tracking branch 'origin/stochastic_transitions' into sto…
RomeshA Jun 5, 2024
c6d990c
Merge remote-tracking branch 'origin/develop' into stochastic_transit…
RomeshA Jun 5, 2024
9dcb653
Fix tests
RomeshA Jun 7, 2024
e39b780
Fix seed selection
RomeshA Jun 7, 2024
8abb36a
Implement very simple example of test reordering for further use later
RomeshA Jun 7, 2024
2a8bc1e
Formatting pass
RomeshA Jun 7, 2024
3e76bf7
Update to Python 3.12
RomeshA Jun 26, 2024
a8ef28d
Enable auto calibration of transfers
RomeshA Jun 27, 2024
c6dbf4b
Update test pipeline
RomeshA Jun 27, 2024
5af7e4b
Update documentation
RomeshA Jun 27, 2024
9a353e1
Update setup.py
RomeshA Jun 27, 2024
8a1b0c1
Merge remote-tracking branch 'origin/develop' into enable-transfer-ca…
RomeshA Jun 27, 2024
6a49703
Update deprecated scipy function
RomeshA Jun 28, 2024
222ad88
Merge branch 'enable-transfer-calibration' into stochastic_transitions
RomeshA Jun 28, 2024
c2fe4ae
Rename stochastic to multinomial
RomeshA Aug 19, 2024
d1c2223
Prefill interaction tables with Y/N more logically
Rowanmh Sep 2, 2024
c752086
More informative sc.prepr output (useful when debugging)
Rowanmh Sep 2, 2024
59851ff
Fix save divide for pop_aggregation == "weighted" in PlotData
kelvinburke Feb 28, 2025
5e42910
Plotdata.set_colors add option for colors=tuple with (color, opacity)
kelvinburke Feb 28, 2025
86d19a6
plotting.py plot_series add optional kwarg colors=None, which gets pa…
kelvinburke Feb 28, 2025
aab2c7c
ProjectSettings.tvec update to latest function using arange - to matc…
kelvinburke Feb 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Plotdata.set_colors add option for colors=tuple with (color, opacity)
kelvinburke committed Feb 28, 2025

Verified

This commit was signed with the committer’s verified signature.
kelvinburke Kelvin Burke
commit 5e42910a3cfeafcf8a5f538f98af4d560c04ebac
4 changes: 3 additions & 1 deletion atomica/plotting.py
Original file line number Diff line number Diff line change
@@ -977,7 +977,9 @@ def set_colors(self, colors=None, results="all", pops="all", outputs="all", over
elif isinstance(colors, list):
assert len(colors) == len(targets), "Number of colors must either be a string, or a list with as many elements as colors to set"
colors = colors
elif colors.startswith("#") or colors not in [m for m in plt.cm.datad if not m.endswith("_r")]:
elif isinstance(colors, tuple) and colors[0].startswith("#"): # tuple with (color, opacity)
colors = [colors for _ in range(len(targets))] # Apply color to all requested outputs
elif isinstance(colors, str) and (colors.startswith("#") or colors not in [m for m in plt.cm.datad if not m.endswith("_r")]):
colors = [colors for _ in range(len(targets))] # Apply color to all requested outputs
else:
color_norm = matplotlib_colors.Normalize(vmin=-1, vmax=len(targets))

Unchanged files with check annotations Beta

"""

Check failure on line 1 in atomica/demos.py

Azure Pipelines / atomicateam.atomica

atomica/demos.py

F821 undefined name 'demos'
Raw output
52:82 F821 undefined name 'demos'
Defines some defaults for Atomica projects
Version: 2018sep24
# -*- coding: utf-8 -*-

Check failure on line 1 in atomica/excel.py

Azure Pipelines / atomicateam.atomica

atomica/excel.py

E226 missing whitespace around arithmetic operator
Raw output
1202:186 E226 missing whitespace around arithmetic operator
"""
Miscellaneous utility functions for Excel files
"""

Check failure on line 1 in atomica/framework.py

Azure Pipelines / atomicateam.atomica

atomica/framework.py

E231 missing whitespace after ','
Raw output
1092:64 E231 missing whitespace after ','
Implements Framework functionality
A Framework contains all of the information defining a model that can be
"""

Check failure on line 1 in atomica/model.py

Azure Pipelines / atomicateam.atomica

atomica/model.py

E712 comparison to False should be 'if cond is False:' or 'if not cond:'
Raw output
903:33 E712 comparison to False should be 'if cond is False:' or 'if not cond:'
Implements the Atomica computational graph
Fundamentally, models in Atomica can be represented as a graph, with