Emma Lesac
Emma Lesac

Reputation: 37

What is cost function in neural network?

Could someone please explain to me why it is so important the cost function in a neural network, what is its purpose?

Note: I'm just introducing me to the subject of neural networks, but failed to understand it perfectly.

Upvotes: 2

Views: 4641

Answers (2)

Daniyal Javaid
Daniyal Javaid

Reputation: 1636

Cost function returns a scalar value called 'cost' , that tells how good or bad your model is. There are several cost functions that can be used. Less cost represent a good model. The reason cost functions are used in neural networks is that 'cost is used by models to improve'

Upvotes: 1

Felipe Oriani
Felipe Oriani

Reputation: 38618

In artificial neural networks, the cost function to return a number representing how well the neural network performed to map training examples to correct output.

See here and here

In other words, after you train a neural network, you have a math model that was trained to adjust its weights to get a better result. The weights and the activation function of each neuron results in a main function, which is the neural network. It is a cost function and its propose is to be adjusted (training step) to produce better results.

Upvotes: 2

Related Questions