survive.base
.Model¶
-
class
survive.base.
Model
[source]¶ Abstract base class for survival models.
Notes
Subclasses of
Model
should have an__init__()
method of the form:def __init__(self, a, b, ...): self.a = a self.b = b ...
Each attribute a, b, … should be a
property
with a setter method that performs validation for that__init__()
parameter. Validation should not be done inside__init__()
itself.Attributes: random_state
Seed for this model’s random number generator.
summary
Structure summarizing this model.
Methods
to_string
([max_line_length])String representation of this model. -
random_state
¶ Seed for this model’s random number generator. This may not be an
numpy.random.RandomState
instance. The internal RNG is not a public attribute and should not be used directly.Returns: - random_state : object
The seed for this model’s RNG.
-
summary
¶ Structure summarizing this model.
Returns: - summary : survive.base.Summary
This model’s summary.
See also
-
to_string
(max_line_length=75)[source]¶ String representation of this model.
Parameters: - max_line_length : int, optional
Specifies the maximum length of a line. If None, everything will be on one line.
Returns: - model_string : str
A string representation of this model which should be able to be used to instantiate a new identical model.