当前位置:网站首页>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 .
边栏推荐
- JS regular filtering and adding image prefixes in rich text
- 【若依(ruoyi)】设置主题样式
- Spherical lens and cylindrical lens
- The difference between sizeof and strlen in C language
- Follow the mouse's angle and keyboard events
- MySQL winter vacation self-study 2022 11 (9)
- Modeling specifications: naming conventions
- [Chongqing Guangdong education] higher mathematics I reference materials of Southwest Petroleum University
- Universal crud interface
- Shell script updates stored procedure to database
猜你喜欢
微服务间通信
What is the investment value of iFLYTEK, which does not make money?
【 kubernets series】 a Literature Study on the Safe exposure Applications of kubernets Service
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 22
RobotFramework入门(二)appUI自动化之app启动
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21
华为、H3C、思科命令对比,思维导图形式从基础、交换、路由三大方向介绍【转自微信公众号网络技术联盟站】
CobaltStrike-4.4-K8修改版安装使用教程
RobotFramework入门(三)WebUI自动化之百度搜索
随机推荐
微服务注册与发现
全国大学生信息安全赛创新实践赛初赛---misc(永恒的夜)
2345文件粉碎,文件强力删除工具无捆绑纯净提取版
有没有完全自主的国产化数据库技术
Master data management theory and Practice
Atcoder beginer contest 233 (a~d) solution
Large scale DDoS attacks take Myanmar offline
深度解析链动2+1模式,颠覆传统卖货思维?
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21
Differences and usage scenarios between TCP and UDP
Redis skip table
Which ecology is better, such as Mi family, graffiti, hilink, zhiting, etc? Analysis of five mainstream smart brands
ERA5再分析资料下载攻略
[network security interview question] - how to penetrate the test file directory through
How to improve the enthusiasm of consumers when the member points marketing system is operated?
2.12 simulation
Fault analysis | analysis of an example of MySQL running out of host memory
What is the investment value of iFLYTEK, which does not make money?
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 9
Descriptor implements ORM model