pcntoolkit.longitudinal.zdiff_score#
Classes#
Two-visit z-diff score (Rehák Bučková et al., 2025). |
Module Contents#
- class ZDiffScore(normative_model: pcntoolkit.normative_model.NormativeModel, reference_data: pcntoolkit.dataio.norm_data.NormData)#
Bases:
pcntoolkit.longitudinal.longitudinal_score.LongitudinalScoreTwo-visit z-diff score (Rehák Bučková et al., 2025).
- Parameters:
normative_model (
NormativeModel) – A fitted BLR normative model.reference_data (
NormData) – People with two visits, usually healthy controls, used to learn how much change is typical.
- zdiff#
Last result of
score, orNonebefore the first call.- Type:
xr.DataArray | None
- score(score_data: pcntoolkit.dataio.norm_data.NormData, save_path: str | os.PathLike[str] | None = None) xarray.DataArray#
Compute one z-diff per subject and response variable.
- Parameters:
score_data (
NormData) – Subjects to score, with two visits each, predictions already computed and visit numbers set.save_path (
str | PathLike[str] | None, optional) –If set, also save the scores to this CSV file:
subjects lh_thickness rh_thickness sub-01 0.42 -1.10 sub-02 -0.35 0.87
- Returns:
z-diff with dimensions
(subjects, response_vars). Also stored asself.zdiff.- Return type:
xr.DataArray