Skip to content

epymorph.data.ipm.seirs

SEIRS

Bases: CompartmentModel

A basic SEIRS model.

compartments class-attribute instance-attribute

compartments = [
    compartment("S"),
    compartment("E"),
    compartment("I"),
    compartment("R"),
]

The compartments of the model.

requirements class-attribute instance-attribute

requirements = [
    AttributeDef(
        "beta", type=float, shape=TxN, comment="infectivity"
    ),
    AttributeDef(
        "sigma",
        type=float,
        shape=TxN,
        comment="progression from exposed to infected",
    ),
    AttributeDef(
        "gamma",
        type=float,
        shape=TxN,
        comment="progression from infected to recovered",
    ),
    AttributeDef(
        "xi",
        type=float,
        shape=TxN,
        comment="progression from recovered to susceptible",
    ),
]

The attributes required by the model.

edges

edges(symbols)

When implementing a CompartmentModel, override this method to define the transition edges between compartments.

Parameters:

  • symbols (ModelSymbols) –

    An object containing the symbols in the model for use in declaring edges. These include compartments and data requirements.

Returns: