Glossary

Cost Function

by Frank Zickert

A **cost function** measures how far a model’s predictions are from the actual outcomes by assigning a numerical “error” value. The goal of training is to **minimize this cost**, meaning the model’s predictions get closer to reality. Different cost functions (e.g., mean squared error, cross-entropy) are used depending on the type of prediction problem.