yasa.SleepStatsAgreement.calibrate#

SleepStatsAgreement.calibrate(data, bias_method='auto', adjust_all=False)[source]#

Calibrate a DataFrame of sleep statistics from a new scorer based on observed biases in obs_data/obs_scorer.

Parameters:
datapandas.DataFrame

A pandas.DataFrame with sleep statistics from an observed scorer. Rows are unique observations and columns are unique sleep statistics.

bias_methodstr

If 'parm', sleep statistics are always adjusted based on parametric bias. If 'regr', sleep statistics are always adjusted based on regression-modeled bias. If 'auto' (default), bias sleep statistics are adjusted by either 'parm' or 'regr', depending on assumption violations.

See also

summary

adjust_all: bool

If False (default), only adjust values for sleep statistics that showed a statistically significant bias in the obs_data. If True, adjust values for all sleep statistics.

Returns:
calibrated_datapandas.DataFrame

A DataFrame with calibrated sleep statistics.

See also

get_calibration_func ..