1

我正在使用 LSTM 进行情绪分类,并且我有三个可选类 - 负面/正面/中性。

我想知道是否有一种方法可以使用单个输出进行此分类,该输出将在 -1:1 的范围内,而 -1 是中性类,0 是负类,1 是正类。

我知道sigmoid函数从 0 到 1,tanh从 -1 到 1,所以使用tanh可能是一个很好的引导,但是使用单个输出分类到三个不同的类仍然有意义吗?

4

1 回答 1

0

Basically it's rather more useful to have three units for each class rather than one - which in the end gives you a score helpful in assigning appropriate class. The intuition behind this is the following :

  1. A final unit (tanh or sigmoid) - should receive in it's input a huge negative number in case of negative class and a huge positive number in case of positive class.
  2. So among units providing input too this final unit you should have neurons which are providing strong input in case of positive and negative classes.
  3. Now take a look at neutral case - then there also should be units which will provide you a certain input to final unit in case to keep input near 0. This needs additional complexity of the net and can hurt a training because this units should not only recognize the neutral inputs but also make inputs from other units less significant.

So, to sum up - to have an efficient model which works with final output between -1 :1 you need to have the same units in your network as will do the job in case with three outputs. Moreover - you need to add additional complexity which will make the outputs from "positive" and "negative" units less significant in neutral case. So - that would rather hurt your training than help in anything.

于 2016-04-20T22:52:40.643 回答