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

Logistic regression for multiclass classification

When more than two classes are involved, logistic regression is known as multinomial logistic regression. In multinomial logistic regression, instead of sigmoid, use the softmax function, which can be described mathematically as follows:

The softmax function produces the probabilities for each class so that the probabilities vector adds up to 1. At the time of inference, the class with the highest softmax value becomes the output or predicted class. The loss function, as we discussed earlier, is the negative log-likelihood function, -l(w)that can be minimized by the optimizers, such as gradient descent.

The loss function for multinomial logistic regression is written formally as follows:

Here, ?(z) is the softmax function.

We will implement this loss function in the next section. In the following section, we will dig into our example for multiclass classification with logistic regression in TensorFlow.

主站蜘蛛池模板: 尼勒克县| 禹州市| 吉林省| 洛阳市| 定安县| 阜宁县| 洛宁县| 邮箱| 永仁县| 卓尼县| 阳东县| 象山县| 英山县| 青铜峡市| 阜新市| 封开县| 青阳县| 亚东县| 江华| 遵化市| 通州市| 万全县| 九台市| 双柏县| 保德县| 会昌县| 吴旗县| 永定县| 白河县| 泽州县| 兰考县| 景泰县| 松滋市| 宁蒗| 宜阳县| 泰来县| 衡山县| 桃江县| 哈尔滨市| 太谷县| 化德县|