# introduce

Logistic regression is one of the most basic classification algorithms. Its model is , where .

its cost function .
For the binary classification problem, the values ​​of y are 0 and 1. Here, we set y=1 probability. When it is greater than or equal to 0.5, we predict the result to be 1, and when it is less than 0.5, we predict the result to be 0.

Iterative formula: where . The derivation process is shown in the figure below. Vectorized expression: .

### Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326171620&siteId=291194637
Recommended
Ranking
Daily
{"ft_lang_label":"__label__en","ft_lang_prob":0.84653497,"math_prob":0.96786886,"size":491,"snap":"2022-40-2023-06","text_gpt3_token_len":119,"char_repetition_ratio":0.09856263,"word_repetition_ratio":0.07058824,"special_character_ratio":0.2382892,"punctuation_ratio":0.17924528,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.998406,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-09T06:57:28Z\",\"WARC-Record-ID\":\"<urn:uuid:6b30d6db-cfac-46a4-b9e4-2511a9ceb144>\",\"Content-Length\":\"28754\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9c37837b-2777-4ef4-89d8-a6592a8bf75b>\",\"WARC-Concurrent-To\":\"<urn:uuid:d8d0c234-ecc1-4f16-ae64-4e2bd7925420>\",\"WARC-IP-Address\":\"104.21.90.188\",\"WARC-Target-URI\":\"https://www.codetd.com/en/article/14071289\",\"WARC-Payload-Digest\":\"sha1:PZW47ASW44LKHMFNWZJRQU74OYCWKEFB\",\"WARC-Block-Digest\":\"sha1:MWVNAGSWJ2V2O7JDBTKZI7LOO2QMSH6C\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764501407.6_warc_CC-MAIN-20230209045525-20230209075525-00531.warc.gz\"}"}