转: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?

image.png

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.


image.png

What is Softmax Function?

image.png

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.


    image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,424评论 0 10
  • pyspark.sql模块 模块上下文 Spark SQL和DataFrames的重要类: pyspark.sql...
    mpro阅读 9,503评论 0 13
  • 1、人在倒霉时最明白。 平时是你好我好大家好,大块吃肉,大碗喝酒,不分彼此,亲如兄弟。而一旦到了倒霉的时候,就会有...
    态度1988阅读 174评论 0 1
  • 全国的朋友们,PMI的家人们,大家好! 我是16期合格火炬手来自黑龙江绥化,我叫勾指幸福。 2019年的5月6日又...
    勾指幸福阅读 184评论 0 0
  • 赛车和普通的家庭用车并不一样。 平常的日子里,赛车并不会停在楼下的车库里,一直等着你。 恰恰相反,她们不出意外,正...
    aa_lxy阅读 376评论 0 1