本文介绍了神经网络按年龄分类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的神经网络(Python,Theano),根据人们从不同商店中选择的消费历史来估算他们的年龄.不幸的是,它并不是特别准确.

I have created a simple neural network (Python, Theano) to estimate a persons age based on their spending history from a selection of different stores. Unfortunately, it is not particularly accurate.

由于网络不了解常规性,因此可能会影响准确性.对于网络,年龄分类之间没有关系.当前正在从softmax输出层中选择概率最高的年龄.

The accuracy might be hurt by the fact that the network has no knowledge of ordinality. For the network there is no relationship between the age classifications. It is currently selecting the age with the highest probability from the softmax output layer.

我已经考虑过将输出分类更改为每个年龄段的加权概率的平均值.

I have considered changing the output classification to an average of the weighted probability for each age.

例如,给定的年龄概率:(10岁:20%,20岁:20%,30岁:60%)

E.g Given age probabilities: (Age 10 : 20%, Age 20 : 20%, Age 30: 60%)

Rather than output: Age 30 (Highest probability)
Weighted Average: Age 24 (10*0.2+20*0.2+30*0.6 weighted average)

该解决方案感觉不够理想.在神经网络中实现序数分类是否更好,还是可以实现的更好的机器学习方法? (例如逻辑回归)

This solution feels sub optimal. Is there a better was to implement ordinal classification in neural networks, or is there a better machine learning method that can be implemented? (E.g logistic regression)

推荐答案

以前的笑嘻嘻的竞争(此线程引用了我在评论中提到的论文).

This problem came up in a previous Kaggle competition (this thread references the paper I mentioned in the comments).

这个想法是,假设您有5个年龄段,其中0< 1< 2 < 3<如图4所示,您可以将它们编码为K-1类并使用S型目标,而不是使用hotmax目标函数对其进行一次热编码.因此,举例来说,您的编码将是

The idea is that, say you had 5 age groups, where 0 < 1 < 2 < 3 < 4, instead of one-hot encoding them and using a softmax objective function, you can encode them into K-1 classes and use a sigmoid objective. So, as an example, your encodings would be

[0] -> [0, 0, 0, 0]
[1] -> [1, 0, 0, 0]
[2] -> [1, 1, 0, 0]
[3] -> [1, 1, 1, 0]
[4] -> [1, 1, 1, 1]

然后,网络将学习订购.希望这会有所帮助.

Then the net will learn the orderings. Hope this helps.

这篇关于神经网络按年龄分类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 19:53