leaspy.io.data.individual_data module

class IndividualData(idx: str)

Bases: object

Container for an individual’s data

Parameters:
idxIDType

Unique ID

Attributes:
idxIDType

Unique ID

timepointsnp.ndarray[float, 1D]

Timepoints associated with the observations

observationsnp.ndarray[float, 2D]

Observed data points. Shape is (n_timepoints, n_features)

cofactorsDict[FeatureType, Any]

Cofactors in the form {cofactor_name: cofactor_value}

Methods

add_cofactors(d)

Include new cofactors

add_observations(timepoints, observations)

Include new observations and associated timepoints

add_cofactors(d: Dict[str, Any]) None

Include new cofactors

Parameters:
dDict[FeatureType, Any]

Cofactors to include, in the form {name: value}

Raises:
LeaspyDataInputError
LeaspyTypeError
add_observations(timepoints: List[float], observations: List[List[float]]) None

Include new observations and associated timepoints

Parameters:
timepointsarray-like[float, 1D]

Timepoints associated with the observations to include

observationsarray-like[float, 2D]

Observations to include

Raises:
LeaspyDataInputError