Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activation function for output layer for regression models in Neural Networks

Tags:

I have been experimenting with neural networks these days. I have come across a general question regarding the activation function to use. This might be a well known fact to but I couldn't understand properly. A lot of the examples and papers I have seen are working on classification problems and they either use sigmoid (in binary case) or softmax (in multi-class case) as the activation function in the out put layer and it makes sense. But I haven't seen any activation function used in the output layer of a regression model.

So my question is that is it by choice we don't use any activation function in the output layer of a regression model as we don't want the activation function to limit or put restrictions on the value. The output value can be any number and as big as thousands so the activation function like sigmoid to tanh won't make sense. Or is there any other reason? Or we actually can use some activation function which are made for these kind of problems?

like image 255
user7400738 Avatar asked Oct 11 '17 05:10

user7400738


People also ask

Which activation function is used for regression in output layer?

The output layer activation function depends on the type of problem that we want to solve. In a regression problem, we use the linear (identity) activation function with one node. In a binary classifier, we use the sigmoid activation function with one node.

Which function is the preferred activation function for output layer in a neural networks?

3. ReLU (Rectified Linear Unit) Activation Function. The ReLU is the most used activation function in the world right now. Since, it is used in almost all the convolutional neural networks or deep learning.

Which activation function is used in output layer of a CNN?

If the output is only restricted to be non-negative, it would make sense to use a ReLU activation as the output function.

What is the best activation function for regression?

Sigmoid is an activation function whose range is located between 0 and 1, and it generally works better when we have to predict the probability as an output in logistic regression scenarios to determine the probability of classes occurrence.


1 Answers

for linear regression type of problem, you can simply create the Output layer without any activation function as we are interested in numerical values without any transformation.

more info :

https://machinelearningmastery.com/regression-tutorial-keras-deep-learning-library-python/

for classification : You can use sigmoid, tanh, Softmax etc.

like image 197
Vaibhav K Avatar answered Sep 28 '22 08:09

Vaibhav K