evalml.problem_types.detect_problem_type

evalml.problem_types.detect_problem_type(y)[source]
Determine the type of problem is being solved based on the targets (binary vs multiclass classification, regression)

Ignores missing and null data

Parameters

y (pd.Series) – the target labels to predict

Returns

ProblemType Enum

Return type

ProblemType

Example

>>> y = pd.Series([0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1])
>>> problem_type = detect_problem_type(y)
>>> assert problem_type == ProblemTypes.BINARY