Source code for evalml.automl.utils

from evalml.objectives import get_objective
from evalml.problem_types import handle_problem_types


[docs]def get_default_primary_search_objective(problem_type): """Get the default primary search objective for a problem type. Arguments: problem_type (str or ProblemType): problem type of interest. Returns: ObjectiveBase: primary objective instance for the problem type. """ problem_type = handle_problem_types(problem_type) objective_name = {'binary': 'Log Loss Binary', 'multiclass': 'Log Loss Multiclass', 'regression': 'R2'}[problem_type.value] return get_objective(objective_name, return_instance=True)