# In image classification, why do we usually minimize a cost function rather than maximizing it?

I was watching a video about policy gradients by Andrej Karpathy. At 10:00, it shows an equation for supervised learning for image classification.

$$\max\sum _{i} \log p(y_i \mid x_i)$$

I have worked with image classification models before, but I always minimized a cost function (aka loss function). I have also never seen someone maximizing a cost function for image classification in the wild.

• So, what are the advantages of a minimizing loss function over a maximizing loss function in image classification?

• Other than RL, which problems do we solve by maximizing a cost function?