当前位置:网站首页>Linear regression and logistic regression
Linear regression and logistic regression
2022-07-06 02:54:00 【uncle_ ll】
Linear regression is a regression problem , Logistic regression is a classification problem .
Linear regression
Labels are consecutive floating-point numbers , For example, based on the area of the house 、 Location and other predicted house prices , Forecast weather based on historical weather and other related issues . The prediction formula is as follows :
Y = X ∗ W + b Y = X*W + b Y=X∗W+b
Logical regression
For linearly separable cases , Two types of data can be distinguished by a straight line , such as :

Suppose the label at the top left of this red line is 1, The label at the bottom right of the red line is 0, be X 1 X_1 X1 And X 3 X_3 X3 Belong to 1, X 2 X_2 X2 Belong to 0 class .
But this way is not very intuitive , There's no better way ? The answer is yes , Further normalization through logical functions 
The above is a logic function , Role is to z Map to the value of , The mapping range is [ 0 , 1 ] [0,~1] [0, 1]:
- If z The value is greater than 0, After being processed by logic function , The scope is [ 0.5 , 1 ] [0.5, 1] [0.5,1]
- If z The value is less than 0, After being processed by logic function , The scope is [ 0 , 0.5 ] [0, 0.5] [0,0.5]
Now we can calculate the probability of each point leaving :
You can see , X 1 X_1 X1 Point belongs to 1 The probability is greater than X 1 X_1 X1 Point belongs to 0 Probability .
边栏推荐
- 解决:AttributeError: ‘str‘ object has no attribute ‘decode‘
- Yyds dry inventory comparison of several database storage engines
- Prototype design
- CobaltStrike-4.4-K8修改版安装使用教程
- Microsoft speech synthesis assistant v1.3 text to speech tool, real speech AI generator
- Shell script updates stored procedure to database
- 【指针训练——八道题】
- Follow the mouse's angle and keyboard events
- Introduction to robotframework (II) app startup of appui automation
- What is the investment value of iFLYTEK, which does not make money?
猜你喜欢
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 18](/img/1a/94ef8be5c06c2d1c52fc8ce7f03ea7.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 18

Pure QT version of Chinese chess: realize two-man, man-machine and network games

Shell script updates stored procedure to database

淘宝焦点图布局实战

4. File modification
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 17](/img/85/2635afeb2edeb0f308045edd1f3431.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 17
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20](/img/d5/4bce239b522696b5312b1346336b5f.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20

微服务间通信

Fault analysis | analysis of an example of MySQL running out of host memory

My C language learning record (blue bridge) -- under the pointer
随机推荐
GifCam v7.0 极简GIF动画录制工具中文单文件版
codeforces每日5题(均1700)-第六天
【若依(ruoyi)】设置主题样式
"Hands on learning in depth" Chapter 2 - preparatory knowledge_ 2.3 linear algebra_ Learning thinking and exercise answers
ReferenceError: primordials is not defined错误解决
Fault analysis | analysis of an example of MySQL running out of host memory
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 14
[ruoyi] ztree custom icon (iconskin attribute)
"Hands on learning in depth" Chapter 2 - preparatory knowledge_ 2.5 automatic differentiation_ Learning thinking and exercise answers
Add one to non negative integers in the array
I sorted out a classic interview question for my job hopping friends
How does yyds dry inventory deal with repeated messages in the consumption process?
OCR文字识别方法综述
Maturity of master data management (MDM)
Which ecology is better, such as Mi family, graffiti, hilink, zhiting, etc? Analysis of five mainstream smart brands
Apt installation ZABBIX
纯Qt版中国象棋:实现双人对战、人机对战及网络对战
不赚钱的科大讯飞,投资价值该怎么看?
Communication between microservices
PMP practice once a day | don't get lost in the exam -7.5