轉:softmax和sigmoid比較

http://dataaspirant.com/2017/03/07/difference-between-softmax-function-and-sigmoid-function/

Conclusion

In this article, you learn in details about two functions which determine the logistic regression model. Just for a glance.

  • Softmax: Used for the multi-classification task.
  • Sigmoid: Used for the binary classification task.

What is Sigmoid Function?

Properties of Sigmoid Function

The sigmoid function returns a real-valued output.
The first derivative of the sigmoid function will be non-negative or non-positive.
Non-Negative: If a number is greater than or equal to zero.
Non-Positive: If a number is less than or equal to Zero.

Sigmoid Function Usage

The Sigmoid function used for binary classification in logistic regression model.
While creating artificial neurons sigmoid function used as the activation function.
In statistics, the sigmoid function graphs are common as a cumulative distribution function.


What is Softmax Function?


Softmax function calculates the probabilities distribution of the event over ‘n’ different events. In general way of saying, this function will calculate the probabilities of each target class over all possible target classes. Later the calculated probabilities will be helpful for determining the target class for the given inputs.

The main advantage of using Softmax is the output probabilities range. The range will 0 to 1, and the sum of all the probabilities will be equal to one. If the softmax function used for multi-classification model it returns the probabilities of each class and the target class will have the high probability.

The formula computes the exponential (e-power) of the given input value and the sum of exponential values of all the values in the inputs. Then the ratio of the exponential of the input value and the sum of exponential values is the output of the softmax function.

Properties of Softmax Function

Below are the few properties of softmax function.

  • The calculated probabilities will be in the range of 0 to 1.
  • The sum of all the probabilities is equals to 1.

Softmax Function Usage

  • Used in multiple classification logistic regression model.
  • In building neural networks softmax functions used in different layer level.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章