神经网络中回归模型输出层的激活函数 [英] Activation function for output layer for regression models in Neural Networks

查看:2554
本文介绍了神经网络中回归模型输出层的激活函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些天我一直在尝试神经网络.我遇到了有关要使用的激活功能的一般性问题.这可能是众所周知的事实,但我无法正确理解.我看到的许多示例和论文都在解决分类问题,它们在输出层中使用Sigmoid(在二进制情况下)或softmax(在多类情况下)作为激活函数,这很有意义.但是我还没有看到回归模型的输出层中使用过任何激活函数.

所以我的问题是,选择是否在回归模型的输出层中不使用任何激活函数,因为我们不希望激活函数限制或限制值.输出值可以是任意数字,最大可以是数千,因此激活功能(如sigmoid到tanh)将毫无意义.还是还有其他原因?还是我们实际上可以使用针对此类问题的一些激活功能?

解决方案

如果在神经网络的输出层中使用Sigmoid作为激活函数,则永远不会得到小于0且大于1的任何值. /p>

基本上,如果您要预测的数据分布在该范围内,则可以使用Sigmoid函数进行处理,并测试您的预测在训练集上的效果是否良好.

更笼统的是,在预测数据时,您应该想到以最有效的方式表示数据的功能.

因此,如果您的真实数据不能很好地适应Sigmoid函数,则您必须考虑其他任何函数(例如某些多项式函数,周期函数或任何其他函数或它们的组合),但您还应该始终注意自己的轻松程度将建立您的成本函数并评估导数.

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?

解决方案

If you have, say, a Sigmoid as an activation function in output layer of your NN you will never get any value less than 0 and greater than 1.

Basically if the data your're trying to predict are distributed within that range you might approach with a Sigmoid function and test if your prediction performs well on your training set.

Even more general, when predict a data you should come up with the function that represents your data in the most effective way.

Hence if your real data does not fit Sigmoid function well you have to think of any other function (e.g. some polynomial function, or periodic function or any other or a combination of them) but you also should always care of how easily you will build your cost function and evaluate derivatives.

这篇关于神经网络中回归模型输出层的激活函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆