private void CheckLabelType(RoleMappedData data, out int labelCardinality)
        {
            _host.Assert(data.Schema.Label.HasValue);

            if (data.Schema.Label.Value.Type == BooleanDataViewType.Instance)
            {
                labelCardinality = 2;
            }
            else
            {
                TrainerUtils.CheckMulticlassLabel(data, out labelCardinality);
                _host.CheckUserArg(labelCardinality > 1, nameof(_labelColumnName), "Label column type must have known cardinality more than 1");
            }
        }