当前位置:网站首页>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 .
边栏推荐
- CSP numeric sort
- Deeply analyze the chain 2+1 mode, and subvert the traditional thinking of selling goods?
- Single instance mode of encapsulating PDO with PHP in spare time
- [unity3d] GUI control
- Prototype design
- [pointer training - eight questions]
- 【若依(ruoyi)】ztree 自定义图标(iconSkin 属性)
- Introduction to robotframework (I) brief introduction and use
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 9
- [Yu Yue education] basic reference materials of digital electronic technology of Xi'an University of Technology
猜你喜欢
Solve 9 with C language × 9 Sudoku (personal test available) (thinking analysis)
Introduction to robotframework (III) Baidu search of webui automation
不赚钱的科大讯飞,投资价值该怎么看?
Communication between microservices
"Hands on learning in depth" Chapter 2 - preparatory knowledge_ 2.5 automatic differentiation_ Learning thinking and exercise answers
Deeply analyze the chain 2+1 mode, and subvert the traditional thinking of selling goods?
故障分析 | MySQL 耗尽主机内存一例分析
[Digital IC manual tearing code] Verilog asynchronous reset synchronous release | topic | principle | design | simulation
[kubernetes series] learn the exposed application of kubernetes service security
[Chongqing Guangdong education] higher mathematics I reference materials of Southwest Petroleum University
随机推荐
Game theory matlab
Network Security Learning - Web vulnerabilities (Part 1)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 11
Redis skip table
Follow the mouse's angle and keyboard events
Referenceerror: primordials is not defined error resolution
一个复制也能玩出花来
Introduction to robotframework (III) Baidu search of webui automation
技术分享 | undo 太大了怎么办
MySQL learning notes-10-tablespace recycling
Which ecology is better, such as Mi family, graffiti, hilink, zhiting, etc? Analysis of five mainstream smart brands
GifCam v7.0 极简GIF动画录制工具中文单文件版
Force buckle 146 LRU cache
Function knowledge points
Apt installation ZABBIX
Descriptor implements ORM model
Pure QT version of Chinese chess: realize two-man, man-machine and network games
Codeforces 5 questions par jour (1700 chacune) - jour 6
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 23
Huawei, H3C, Cisco command comparison, mind map form from the basic, switching, routing three directions [transferred from wechat official account network technology alliance station]