官术网_书友最值得收藏!

The softmax function

The softmax function is mainly used to handle classification problems and preferably used in the output layer, outputting the probabilities of the output classes. As seen earlier, while solving the binary logistic regression, we witnessed that the sigmoid function was able to handle only two classes. In order to handle multi-class we need a function that can generate values for all the classes and those values follow the rules of probability. This objective is fulfilled by the softmax function, which shrinks the outputs for each class between 0 and 1 and divides them by the sum of the outputs for all the classes:

For examples, , where x refers to four classes.

Then, the softmax function will gives results (rounded to three decimal places) as:

Thus, we see the probabilities of all the classes. Since the output of every classifier demands probabilistic values for all the classes, the softmax function becomes the best candidate for the outer layer activation function of the classifier.

主站蜘蛛池模板: 成安县| 临朐县| 青神县| 凌源市| 桑日县| 五指山市| 德江县| 阆中市| 夏津县| 兰溪市| 宝山区| 曲水县| 诸城市| 江西省| 平果县| 深州市| 泾川县| 灵璧县| 班戈县| 景东| 内江市| 呼图壁县| 罗江县| 嵩明县| 军事| 阜新市| 道孚县| 遂宁市| 祁阳县| 龙山县| 沂源县| 扶沟县| 永顺县| 滨海县| 容城县| 岳普湖县| 乌鲁木齐县| 屏东市| 广丰县| 大城县| 阳山县|