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

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.

主站蜘蛛池模板: 长治县| 仁化县| 若羌县| 张家口市| 五台县| 博野县| 车险| 丰城市| 大化| 桂林市| 象山县| 渝中区| 南丰县| 桃源县| 志丹县| 同江市| 钟山县| 东乌| 绥滨县| 武冈市| 贡嘎县| 宁城县| 靖宇县| 封丘县| 五常市| 鄂伦春自治旗| 睢宁县| 鄂州市| 江陵县| 滨州市| 靖安县| 土默特右旗| 托克托县| 文成县| 内黄县| 吴忠市| 波密县| 宜春市| 平遥县| 称多县| 会东县|