osl_dynamics.stats.glm.complete_case_groups#

osl_dynamics.stats.glm.complete_case_groups(X, y, warn=True)#

Group the targets by their pattern of missing values.

Each target is fitted with the samples that are complete for that target (per-target complete-case analysis).

Parameters:
Xnp.ndarray

Design matrix. Shape is (n_samples, n_features).

ynp.ndarray

Data. Shape is (n_samples, n_targets).

warnbool, optional

Log a warning when there are missing values.

Returns:
groupslist of tuple

One (rows, targets) pair per missing-value pattern, where rows is a boolean mask of the complete samples and targets the indices of the targets with that pattern.