# Objective Function

## Definition of Objective Function

An objective function (in machine learning) is a mathematical formula used to calculate the relative merit of each possible solution to a problem. The objective function takes into account the inputs and outputs of a problem, as well as any constraints that may exist. It then calculates a score for each possible solution in order to help identify the best option.