是否存在输出为概率的后向误差传播版本?
我想创建一个前馈神经网络,其中训练数据中的输出为布尔值、0 或 1。
但是,在使用中,我希望输出是该输入产生 0 或 1 的预期概率。
鉴于反向传播最常见的形式采用 sigmoid 激活函数 ,这似乎不太可能导致实际概率作为输出(sigmoid 曲线看起来并不像一个“概率”函数 - 抱歉,我知道这是手-波浪)。
或者也许我错了。使用 sigmoid 激活函数并使用 backprob 进行训练的前馈神经网络的输出是否可以安全地视为获得 1 而不是 0 的实际概率?
I want to create a feed-forward neural network where the outputs in the training data are boolean, 0 or 1.
In use, however, I want the output to be the expected probability that that input would have produced a 0 or a 1.
Given that the most common forms of backprop employ a sigmoid activation function, , it seems unlikely that this would result in actual probabilities as output (the sigmoid curve doesn't really seem like a "probabilistic" function - sorry, I know this is hand-wavey).
Or perhaps I'm wrong. Can the outputs of a feed-forward neural net, using sigmoid activation functions, and trained using backprob be safely treated as the actual probability of getting a 1 as opposed to a 0?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,如果您使用标准 sigmoid 激活函数,这将按照您想要的方式工作。
证明这一点的数学有点复杂,但它实际上可以归结为这样一个事实:您正在训练 sigmoid 函数来生成输出训练集的平均值(这是在正常反向传播中使用平方误差函数的结果) 。由于两个可能的值是 0 和 1,因此平均值恰好等于获得 1 的概率。
Yes, this will work in the way that you want it if you use a standard sigmoid activation function.
The maths that proves this is a little complicated, but it effectively boils down to the fact that you are training the sigmoid function to generate the average value of the output training set (this is a consequence of using the squared error function in normal backprop). Since the two possibles values are 0 and 1, the average value is therefore exactly equal to the probability of getting a 1.