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

Logistic regression for binary classification

For binary classification, the model function ?(z) is defined as the sigmoid function, which can be described as follows:

The sigmoid function transforms the y value to be between the range [0,1]. Thus, the value of y=?(z) can be used to predict the class: if y > 0.5, then the object belongs to 1, otherwise the object belongs to 0.

The model training means to search for the parameters that minimize the loss function, which can either be the sum of squared errors or the sum of mean squared errors. For logistic regression, the likelihood is maximized as follows:

 

However, as it is easier to maximize the log-likelihood, we use the log-likelihood (l(w)as the cost function. The loss function (J(w)) is written as -l(w), and can be minimized by using optimization algorithms such as gradient descent.

The loss function for binary logistic regression is written mathematically as follows:

Here, ?(z) is the sigmoid function.

主站蜘蛛池模板: 两当县| 古蔺县| 佛冈县| 祁门县| 喀什市| 南召县| 两当县| 杭锦旗| 澄城县| 葫芦岛市| 岚皋县| 克什克腾旗| 布拖县| 长阳| 宁武县| 定远县| 济阳县| 临颍县| 东乡| 司法| 兴城市| 宜黄县| 呈贡县| 焉耆| 来凤县| 江永县| 苍南县| 西乌| 龙陵县| 偃师市| 图们市| 富川| 双峰县| 林芝县| 莱芜市| 兴和县| 岳池县| 亳州市| 土默特左旗| 新营市| 武冈市|