In empirical risk minimization, the supervised learning algorithm seeks the function g {\displaystyle g} that minimizes R ( g ) {\displaystyle R(g)} . Hence, a supervised learning algorithm can be constructed by applying an optimization algorithm to find g {\displaystyle g} .