check_target_type#
- imblearn.utils.check_target_type(y, indicate_one_vs_all=False)[source]#
Check the target types to be conform to the current samplers.
The current samplers should be compatible with
'binary'
,'multilabel-indicator'
and'multiclass'
targets only.- Parameters:
- yndarray
The array containing the target.
- indicate_one_vs_allbool, default=False
Either to indicate if the targets are encoded in a one-vs-all fashion.
- Returns:
- yndarray
The returned target.
- is_one_vs_allbool, optional
Indicate if the target was originally encoded in a one-vs-all fashion. Only returned if
indicate_multilabel=True
.