当前位置:网站首页>[note] logistic regression
[note] logistic regression
2022-07-27 14:07:00 【Sprite.Nym】
One 、 Overview of logistic regression
(1) The purpose of logistic regression : classification .
Logistic regression often solves classification problems , Especially the binary classification problem .
(2) The process of logistic regression : Return to .
The result is 0~1 Continuous values between , Represents the possibility of occurrence ( Class probability ).
(3) threshold : Complete the classification through the comparison of possibility and threshold .
Such as : Calculate the possibility of default , If it is greater than 0.5, The borrower is classified as a bad customer .
Two 、 Logistic regression model
Because in the second classification problem , Tags are only yes or no (1 and 0), If linear regression is used for fitting , The range of linear regression is not 0 ~ 1 Between , The prediction result is difficult to be output as possibility . And if we use piecewise function to fit , Because the piecewise function is not continuous , The predicted result is not the possibility we hope 0 ~ 1 Continuous values of .
The solution is to combine linear regression with sigmoid Functions together , That is to form a nested function .
sigmoid Function image :

Nested functions composed of :
3、 ... and 、 The loss function of logistic regression
If we directly combine y ^ \hat y y^ Replace with sigmoid Function as the loss function of logistic regression to find the minimum value , You will find that this function is not convex , Therefore, other loss functions are used .
(1) In the problem of classification y Probability
Due to agreement y ^ = P ( y = 1 ∣ x ) \hat y=P(y=1|x) y^=P(y=1∣x) , therefore :
y = 1 y=1 y=1 when , P ( y ∣ x ) = y ^ P(y|x)=\hat y P(y∣x)=y^
y = 0 y=0 y=0 when , P ( y ∣ x ) = 1 − y ^ P(y|x)=1-\hat y P(y∣x)=1−y^
Merge to get :
P ( y ∣ x ) = y ^ y ( 1 − y ^ ) ( 1 − y ) P(y|x)={\hat y}^y(1-\hat y)^{(1-y)} P(y∣x)=y^y(1−y^)(1−y)
(2) Using the maximum likelihood estimation method to estimate the model parameters
The likelihood function is :
The log likelihood function is :
Find the maximum value of the maximum likelihood function , The most ideal parameter value can be obtained . So for the whole training set , The cost function can be defined as :

边栏推荐
- YOLOX改进之一:添加CBAM、SE、ECA注意力机制
- Flat die cutting machine
- 基于RoBERTa-wwm动态融合模型的中文电子病历命名实体识别
- 在灯塔工厂点亮5G,宁德时代抢先探路中国智造
- 为什么会出现Script file ‘D:\Anaconda3\envs\paddle_env\Scripts\pip-script.py‘ is not present.
- 融合迁移学习与文本增强的中文成语隐喻知识识别与关联研究
- 小程序毕设作品之微信校园洗衣小程序毕业设计成品(6)开题答辩PPT
- 13、用户web层服务(一)
- Swiftui map encyclopedia use mapkit to search
- Dako held a meeting for the biological IPO: the annual revenue was 837million, and Wu Qingjun and his daughter were the actual controllers
猜你喜欢

Group division and characteristic analysis of depression patients based on online consultation records

小程序毕设作品之微信校园洗衣小程序毕业设计成品(8)毕业设计论文模板

文旅数藏 | 用艺术的方式游云南

不需要标注数据的语义分割!ETH&鲁汶大学提出MaskDistill,用Transformer来进行无监督语义分割,SOTA!...
![[training day3] reconstruction of roads [SPFA]](/img/eb/4729954bf5c6c0dc85daed9ca127f7.png)
[training day3] reconstruction of roads [SPFA]

基于STM32的自由度云台运动姿态控制系统

The universe has no end. Can utonmos shine the meta universe into reality?

Accuracy improvement method: efficient visual transformer framework of adaptive tokens (open source)

Zoom, translation and rotation of OpenCV image

Thinkphp+ pagoda operation environment realizes scheduled tasks
随机推荐
Software testing system architecture designer concise tutorial | software testing
【多线程的相关内容】
NFT 的 10 种实际用途
面向流行性疾病科普的用户问题理解与答案内容组织
[training day3] reconstruction of roads [SPFA]
[luogu_p4820] [national training team] stack [mathematics] [physics] [harmonic progression]
为什么会出现Script file ‘D:\Anaconda3\envs\paddle_env\Scripts\pip-script.py‘ is not present.
Chapter3 data analysis of the U.S. general election gold offering project
不需要标注数据的语义分割!ETH&鲁汶大学提出MaskDistill,用Transformer来进行无监督语义分割,SOTA!...
Wechat campus laundry applet graduation design finished product of applet completion work (8) graduation design thesis template
西测测试深交所上市:年营收2.4亿募资9亿 市值47亿
Brief tutorial for soft exam system architecture designer | system design
Cultural tourism and data collection | travel to Yunnan in an artistic way
达科为生物IPO过会:年营收8.37亿 吴庆军父女为实控人
Travel notes from July 11 to August 1, 2022
Flat die cutting machine
[x for x in list_a if not np.isnan(x)]和[x if not np.isnan(x) else None for x in list_a]的区别
[internship experience] add your own implementation method to the date tool class
NoSQL —— NoSQL 三大理论基石 —— CAP —— BASE—— 最终一致性
Weice biological IPO meeting: annual revenue of 1.26 billion Ruihong investment and Yaohe medicine are shareholders