skada.utils.check_X_y_domain
- skada.utils.check_X_y_domain(X, y, sample_domain=None, allow_source: bool = True, allow_multi_source: bool = True, allow_target: bool = True, allow_multi_target: bool = True, allow_auto_sample_domain: bool = True, allow_nd: bool = False, allow_label_masks: bool = True)[source]
Input validation for domain adaptation (DA) estimator. If we work in single-source and single target mode, return source and target separately to avoid additional scan for 'sample_domain' array.
- Parameters:
- Xarray-like of shape (n_samples, n_features)
Input features
- yarray-like of shape (n_samples,)
Target variable
- sample_domainarray-like or None, optional (default=None)
Array specifying the domain labels for each sample.
- allow_sourcebool, optional (default=True)
Allow the presence of source domains.
- allow_multi_sourcebool, optional (default=True)
Allow multiple source domains.
- allow_targetbool, optional (default=True)
Allow the presence of target domains.
- allow_multi_targetbool, optional (default=True)
Allow multiple target domains.
- allow_auto_sample_domainbool, optional (default=True)
Allow automatic generation of sample_domain if not provided.
- allow_ndbool, optional (default=False)
Allow X and y to be N-dimensional arrays.
- allow_label_masksbool, optional (default=True)
Allow NaNs in y.
- Returns:
- Xarray
Input features
- yarray
Target variable
- sample_domainarray
Array specifying the domain labels for each sample.