Models#

Please note that most functions are helper functions and are not meant to be used directly.

pyaging.models._models#

class pyaging.models._models.ABEC[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.ADBahadoSingh[source][source]#

Bases: LinearReferenceClock

postprocess(x)[source][source]#

Logistic transform to an Alzheimer’s disease risk probability.

The published logit constant (-0.072) is carried in the linear intercept.

class pyaging.models._models.AltumAge[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Scales an array based on the median and standard deviation.

class pyaging.models._models.BiTAge[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Binarizes an array based on the median of each row, excluding zeros.

class pyaging.models._models.Bocklandt[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.Bohlin[source][source]#

Bases: LinearReferenceClock

postprocess(x)[source][source]#

Model returns gestational age in days; convert to weeks.

class pyaging.models._models.CTSLiver[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.CVDWesterman[source][source]#

Bases: LinearReferenceClock

postprocess(x)[source][source]#

Logistic transform to a CVD risk probability.

class pyaging.models._models.CamilloH3K27ac[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.CamilloH3K27me3[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.CamilloH3K36me3[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.CamilloH3K4me1[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.CamilloH3K4me3[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.CamilloH3K9ac[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.CamilloH3K9me3[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.CamilloPanHistone[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.CellPopAge[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.CompIL6[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.CorticalClock[source][source]#

Bases: LinearReferenceClock

postprocess(x)[source][source]#

Horvath anti-logarithmic linear transformation (adult age = 20).

class pyaging.models._models.CpGPTGrimAge3[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Converts from a Cox parameter to age in units of years.

preprocess(x)[source][source]#

Scales an array based on the median and standard deviation.

class pyaging.models._models.CpGPTPCGrimAge3[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x)[source][source]#

Converts from a Cox parameter to age in units of years.

preprocess(x)[source][source]#

Scales an array based on the mean and standard deviation.

class pyaging.models._models.DNAmFILi[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.DNAmFitAge[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DNAmFitAgeGaitF[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DNAmFitAgeGaitM[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DNAmFitAgeGripF[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DNAmFitAgeGripM[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DNAmFitAgeVO2Max[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DNAmIC[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DNAmPhenoAge[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DNAmStress[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.DNAmTL[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DeconvoluteBloodEPIC[source][source]#

Bases: DeconvolutionSingleCell

class pyaging.models._models.DeconvolutionSingleCell[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DepressionBarbu[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.DownSyndrome[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.DunedinPACE[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Apply quantile normalization on x using gold standard means.

class pyaging.models._models.DunedinPoAm38[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.ENCen100[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.ENCen40[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.EPICGA[source][source]#

Bases: LinearReferenceClock

postprocess(x)[source][source]#

Model returns gestational age in days; convert to weeks.

class pyaging.models._models.EnsembleAgeHumanMouse[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.EnsembleAgeStatic[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.EnsembleAgeStaticTop[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.EpiCMITHyper[source][source]#

Bases: epiTOC1

class pyaging.models._models.EpiCMITHypo[source][source]#

Bases: epiTOC1

class pyaging.models._models.EpiTOC3[source][source]#

Bases: epiTOC2

class pyaging.models._models.Garagnani[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.GliaSin[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.GrimAge[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x)[source][source]#

Converts from a Cox parameter to age in units of years.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x)[source][source]#

Converts from a Cox parameter to age in units of years.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2ADM[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2B2M[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2CystatinC[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2GDF15[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2Leptin[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2LogA1C[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2LogCRP[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2PAI1[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2PackYrs[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.GrimAge2TIMP1[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.HRSInCHPhenoAge[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Han[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Hannum[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Hep[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.HepatoXu[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.Horvath2013[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.HypoClock[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Compute mean beta per sample, excluding missing (-1) values.

class pyaging.models._models.IntrinClock[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Knight[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.LeeControl[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.LeeRefinedRobust[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.LeeRobust[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Lin[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.LinearReferenceClock[source][source]#

Bases: pyagingModel

Base class for linear methylation clocks that impute missing features from reference_values (when provided) and apply no output transform.

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Mammalian1[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic transformation with an offset of -2.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Mammalian2[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x, x_species)[source][source]#

Converts output of relative age to age in units of years.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Mammalian3[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x, x_species)[source][source]#

Converts output of to units of years.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.MammalianBlood2[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x, x_species)[source][source]#

Converts output of relative age to age in units of years.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.MammalianBlood3[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x, x_species)[source][source]#

Converts output of to units of years.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.MammalianFemale[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies a sigmoid transformation.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.MammalianLifespan[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-log transformation.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.MammalianSkin2[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x, x_species)[source][source]#

Converts output of relative age to age in units of years.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.MammalianSkin3[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x, x_species)[source][source]#

Converts output of to units of years.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Mayne[source][source]#

Bases: LinearReferenceClock

postprocess(x)[source][source]#

Gestational age in weeks (as published).

class pyaging.models._models.McCartneyAlcohol[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.McCartneyBMI[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.McCartneyBodyFat[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.McCartneyEducation[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.McCartneyHDLCholesterol[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.McCartneyLDLCholesterol[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.McCartneySmoking[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.McCartneyTotalCholesterol[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.McCartneyTotalHDLRatio[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.McCartneyWHR[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.Meer[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Transforms age in days to age in months.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.NeuSin[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.OcampoATAC1[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Normalize a PyTorch tensor of counts to TPM (Transcripts Per Million) then transforms with log1p.

class pyaging.models._models.OcampoATAC2[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Normalize a PyTorch tensor of counts to TPM (Transcripts Per Million) then transforms with log1p.

class pyaging.models._models.PCDNAmTL[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.PCGrimAge[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.PCHannum[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.PCHorvath2013[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.PCPhenoAge[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.PCSkinAndBlood[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Pasta[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Apply linear scaling and shifting constants from the original Pasta definition.

preprocess(x)[source][source]#

Fill missing values with the global median then rank-normalize per sample.

class pyaging.models._models.PastaMouse[source][source]#

Bases: Pasta

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

set_mouse_features(full_features, full_reference_values=None, mouse_prefix='ENSMUSG')[source][source]#

Configure the mouse-only interface while keeping the full feature space for the base model.

class pyaging.models._models.PedBE[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Petkovich[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies a convertion from the output of an ElasticNet to mouse age in months.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.PhenoAge[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies a convertion from a CDF of the mortality score from a Gompertz distribution to phenotypic age.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.PipekElasticNet[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.PipekFilteredH[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.PipekRetrainedH[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.ProstateCancerKirby[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.ReedBMI[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.Reg[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Add the REG intercept term after linear prediction.

preprocess(x)[source][source]#

Fill missing values with the global median then rank-normalize per sample.

class pyaging.models._models.RepliTali[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.RepliTaliNorm[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.RetroelementAgeV1[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.RetroelementAgeV2[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.SenChronoAge[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.SenCultureAge[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.SenMortalityAge[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.SexScoreBase[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.SkinAndBlood[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies an anti-logarithmic linear transformation to a PyTorch tensor.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.StemTOCvitro[source][source]#

Bases: stemTOC

class pyaging.models._models.StocH[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.StocP[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.StocZ[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.Stubbs[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Applies a convertion from the output of an ElasticNet to mouse age in months.

preprocess(x)[source][source]#

Apply quantile normalization on x using gold standard means and then scale with the means and standard deviation.

class pyaging.models._models.SystemsAge[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeBase[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.SystemsAgeBlood[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeBrain[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeHeart[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeHormone[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeImmune[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeInflammation[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeKidney[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeLiver[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeLung[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeMetabolic[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.SystemsAgeMusculoSkeletal[source][source]#

Bases: SystemsAgeBase

class pyaging.models._models.Thompson[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.TwelveCellDeconvoluteBloodEPIC[source][source]#

Bases: DeconvolutionSingleCell

class pyaging.models._models.VidalBralo[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.Weidner[source][source]#

Bases: LinearReferenceClock

class pyaging.models._models.Wu[source][source]#

Bases: LinearReferenceClock

postprocess(x)[source][source]#

Horvath anti-log (adult age = 48) giving months, then months to years.

class pyaging.models._models.XChrom[source][source]#

Bases: SexScoreBase

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class pyaging.models._models.YChrom[source][source]#

Bases: SexScoreBase

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class pyaging.models._models.YingAdaptAge[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.YingCausAge[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.YingDamAge[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.ZhangBLUP[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Scales the input PyTorch tensor per row with mean 0 and std 1.

class pyaging.models._models.ZhangEN[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Scales the input PyTorch tensor per row with mean 0 and std 1.

class pyaging.models._models.ZhangMortality[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.cABEC[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.eABEC[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.epiTOC1[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.

class pyaging.models._models.epiTOC2[source][source]#

Bases: pyagingModel

forward(x)[source][source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Replace NaNs with zero; missing features should already be imputed via reference_values.

class pyaging.models._models.stemTOC[source][source]#

Bases: pyagingModel

postprocess(x)[source][source]#

Postprocess the model output. This method should be implemented by all subclasses.

preprocess(x)[source][source]#

Preprocess the input data. This method should be implemented by all subclasses.