Starsim

Latest version: v1.0.3

Safety actively analyzes 665719 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 8

0.3.2

--------------------------
- Change to syphilis model to permit latent transmission.
- *GitHub info*: PR `450 <https://github.com/starsimhub/starsim/pull/450>`_

0.3.1

--------------------------
- Added SIS model.
- Fixes distribution initialization.
- Allows interventions and analyzers to be functions.
- Tidies up tests.
- Performance improvements in ``UIDArray`` (~3x faster for large numbers of agents).
- *GitHub info*: PR `428 <https://github.com/amath-idm/stisim/pull/428>`_

0.3.0

--------------------------

New RNGs & distributions
~~~~~~~~~~~~~~~~~~~~~~~~
- Replaces ``ss.SingleRNG()``, ``ss.MultiRNG()``, ``ss.ScipyDistribution()``, and ``ss.ScipyHistogram()`` with a single ``ss.Dist()`` class. The ``starsim.random`` and ``starsim.distributions`` submodules have been removed, and ``starsim.dists`` has been added.
- The ``ss.Dist`` class uses ``np.random.default_rng()`` rather than ``scipy.stats`` by default, although a ``scipy.stats`` distribution can be supplied as an alternative. This is up to 4x faster (including, critically, for Bernoulli distributions).
- Also removes ``ss.options.multirng`` (the new version is equivalent to it being always on).
- Removes duplicate logic for transmission (``make_new_cases()``)
- Adds new custom distributions such as ``ss.choice()`` and ``ss.delta()``.
- These distributions can be called directly, e.g. ``dist = ss.weibull(c=2); dist(5)`` will return 5 random variates from a Weibull distribution.
- Instead of being manually initialized based on the name, the ``Sim`` object is parsed and all distributions will be initialized with a unique identifier based on their place in the object (e.g. ``sim.diseases.sir.pars.dur_inf``), which is used to set their unique seed.

Other changes
~~~~~~~~~~~~~
- This PR also fixes bugs with lognormal parameters, and makes it clear whether the parameters are for the *implicit* normal distribution (``ss.lognorm_im()``, the NumPy/SciPy default, equivalent to ``ss.lognorm_mean()`` previously) or the "explicit" lognormal distribution (``ss.lognorm_ex()``, equivalent to ``ss.lognorm()`` previously).
- Renames ``ss.dx``, ``ss.tx``, ``ss.vx`` to``ss.Dx``, ``ss.Tx``, ``ss.Vx``.
- Removed ``set_numba_seed()`` as a duplicate of ``set_seed()``.
- *GitHub info*: PR `392 <https://github.com/amath-idm/stisim/pull/392>`_

0.2.10

---------------------------
- SIR duration of infection now accounts for dt
- Reworked sir_vaccine to modify rel_sus instead of moving agents from susceptible to recovered.
- n_years no longer necessarily an integer
- *GitHub info*: PR `389 <https://github.com/amath-idm/stisim/pull/389>`_

0.2.9

--------------------------
- Renames and extends the multirng option in settings, now called 'rng', which set how random numbers are handled in Starsim with three options:

- "centralized" uses the centralized numpy random number generator for all distributions.
- "single" uses a separate (SingleRNG) random number generator for each distribution.
- "multi" uses a separate (MultiRNG) random number generator for each distribution.
- *GitHub info*: PR `349 <https://github.com/amath-idm/stisim/pull/349>`_

0.2.8

--------------------------
- Add ``ss.demo()`` to quickly create a default simulation.
- *GitHub info*: PR `380 <https://github.com/amath-idm/stisim/pull/380>`_

Page 4 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.