当前位置:网站首页>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 .
边栏推荐
- RobotFramework入门(三)WebUI自动化之百度搜索
- Game theory matlab
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 10
- Introduction to robotframework (III) Baidu search of webui automation
- #PAT#day10
- How to read excel, PDF and JSON files in R language?
- ReferenceError: primordials is not defined错误解决
- 【Kubernetes 系列】一文學會Kubernetes Service安全的暴露應用
- Referenceerror: primordials is not defined error resolution
- 主数据管理(MDM)的成熟度
猜你喜欢
4. File modification
A copy can also produce flowers
ERA5再分析资料下载攻略
华为、H3C、思科命令对比,思维导图形式从基础、交换、路由三大方向介绍【转自微信公众号网络技术联盟站】
C language - Blue Bridge Cup - promised score
【Kubernetes 系列】一文学会Kubernetes Service安全的暴露应用
[network security interview question] - how to penetrate the test file directory through
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 16
Qt发布exe软件及修改exe应用程序图标
ReferenceError: primordials is not defined错误解决
随机推荐
C # create self host webservice
Game theory matlab
Add one to non negative integers in the array
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 19
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 23
07 单件(Singleton)模式
2.11 simulation summary
Which ecology is better, such as Mi family, graffiti, hilink, zhiting, etc? Analysis of five mainstream smart brands
华为、H3C、思科命令对比,思维导图形式从基础、交换、路由三大方向介绍【转自微信公众号网络技术联盟站】
Deeply analyze the chain 2+1 mode, and subvert the traditional thinking of selling goods?
Function knowledge points
Sign SSL certificate as Ca
[ruoyi] set theme style
My C language learning record (blue bridge) -- under the pointer
微软语音合成助手 v1.3 文本转语音工具,真实语音AI生成器
Pure QT version of Chinese chess: realize two-man, man-machine and network games
Solution: attributeerror: 'STR' object has no attribute 'decode‘
DDoS attacks - are we really at war?
Single instance mode of encapsulating PDO with PHP in spare time
How to improve the enthusiasm of consumers when the member points marketing system is operated?