逻辑回归画图

申请流程 (Application Flow)

Logistic Regression is one of the most fundamental algorithms for classification in the Machine Learning world.

Logistic回归是机器学习世界中分类的最基本算法之一。

But before proceeding with the algorithm, let’s first discuss the lifecycle of any machine learning model. This diagram explains the creation of a Machine Learning model from scratch and then taking the same model further with hyperparameter tuning to increase its accuracy, deciding the deployment strategies for that model and once deployed setting up the logging and monitoring frameworks to generate reports and dashboards based on the client requirements. A typical lifecycle diagram for a machine learning model looks like:

但是在继续算法之前,让我们首先讨论任何机器学习模型的生命周期。 该图说明了从头开始创建机器学习模型的过程,然后通过超参数调整进一步推广了该模型,以提高其准确性,确定了该模型的部署策略,并在部署后设置了日志记录和监视框架以生成基于报告和仪表板的信息。根据客户要求。 机器学习模型的典型生命周期图如下所示:

介绍 (Introduction)

In linear regression, the type of data we deal with is quantitative, whereas we use classification models to deal with qualitative data or categorical data. The algorithms used for solving a classification problem first predict the probability of each of the categories of the qualitative variables, as the basis for making the classification. And, as the probabilities are continuous numbers, classification using probabilities also behave like regression methods. Logistic regression is one such type of classification model which is used to classify the dependent variable into two or more classes or categories.

在线性回归中,我们处理的数据类型是定量的,而我们使用分类模型来处理定性数据或分类数据。 用于解决分类问题的算法首先预测定性变量的每个类别的概率,作为进行分类的基础。 并且,由于概率是连续数,因此使用概率进行分类的行为也类似于回归方法。 逻辑回归是一种这样的分类模型,用于将因变量分为两个或多个类别或类别。

Why don’t we use Linear regression for classification problems?

为什么我们不对分类问题使用线性回归?

Let’s suppose you took a survey and noted the response of each person as satisfied, neutral or Not satisfied. Let’s map each category:

假设您进行了一项调查,并注意到每个人的回答为满意,中立或不满意。 让我们映射每个类别:

Satisfied — 2

满意— 2

Neutral — 1

中立— 1

Not Satisfied — 0

不满意— 0

But this doesn’t mean that the gap between Not satisfied and Neutral is same as Neutral and satisfied. There is no mathematical significance of these mapping. We can also map the categories like:

但这并不意味着不满意和中立之间的差距与中立和满意之间的差距相同。 这些映射没有数学意义。 我们还可以映射以下类别:

Satisfied — 0

满意— 0

Neutral — 1

中立— 1

Not Satisfied — 2

不满意— 2

It’s completely fine to choose the above mapping. If we apply linear regression to both the type of mappings, we will get different sets of predictions. Also, we can get prediction values like 1.2, 0.8, 2.3 etc. which makes no sense for categorical values. So, there is no normal method to convert qualitative data into quantitative data for use in linear regression. Although, for binary classification, i.e. when there only two categorical values, using the least square method can give decent results. Suppose we have two categories Black and White and we map them as follows:

选择上面的映射是完全可以的。 如果将线性回归应用于这两种映射类型,我们将获得不同的预测集。 同样,我们可以获得诸如1.2、0.8、2.3等的预测值,这对于分类值没有意义。 因此,没有正常的方法可以将定性数据转换为定量数据以用于线性回归。 虽然,对于二进制分类,即当只有两个分类值时,使用最小二乘法可以得到不错的结果。 假设我们有黑色和白色两个类别,我们将它们映射如下:

Black — 0

黑色— 0

White — 1

白色— 1

We can assign predicted values for both the categories such as Y> 0.5 goes to class white and vice versa. Although, there will be some predictions for which the value can be greater than 1 or less than 0 making them hard to classify in any class. Nevertheless, linear regression can work decently for binary classification but not that well for multi-class classification. Hence, we use classification methods for dealing with such problems.

我们可以为这两个类别分配预测值,例如Y> 0.5归为白色类别,反之亦然。 虽然,有些预测的值可能大于1或小于0,这使得它们很难在任何类别中进行分类。 然而,线性回归对于二元分类可以很好地工作,但对于多分类则不能很好地工作。 因此,我们使用分类方法来处理此类问题。

逻辑回归 (Logistic Regression)

Logistic regression is one such regression algorithm which can be used for performing classification problems. It calculates the probability that a given value belongs to a specific class. If the probability is more than 50%, it assigns the value in that particular class else if the probability is less than 50%, the value is assigned to the other class. Therefore, we can say that logistic regression acts as a binary classifier.

逻辑回归是一种可以用于执行分类问题的回归算法。 它计算给定值属于特定类别的概率。 如果概率大于50%,则在该特定类别中分配值,否则,如果概率小于50%,则将该值分配给另一类别。 因此,可以说逻辑回归充当二进制分类器。

Working of a Logistic Model

物流模型的工作

For linear regression, the model is defined by:

逻辑回归画图_逻辑回归相关推荐

  1. 逻辑回归阈值_逻辑回归or线性回归,傻傻分不清楚

    欢迎关注"生信修炼手册"! 线性回归作为一种常用的关联分析工具,其功能强大,解释度高,但是其缺点也是很明显的.其只适用于处理连续型的变量,无法处理离散型的变量,比如对于case/c ...

  2. 逻辑回归阈值_逻辑回归算法

    (一)逻辑回归原理 1.整体概括 逻辑回归假设数据服从伯努利分布(0-1分布),通过极大似然函数的方法,运用梯度下降法来求解参数,来达到将数据二分类的目的. 2.灵感过程(来自B站UP主:文小刀是也) ...

  3. 逻辑回归模型_逻辑回归

    逻辑回归模型 By Neeta Ganamukhi Neeta Ganamukhi着 Department of Business and Economics 商业与经济系 Abstract: The ...

  4. 逻辑回归优点_逻辑回归:优点

    逻辑回归优点 by Thalles Silva 由Thalles Silva 逻辑回归:优点 (Logistic Regression: The good parts) 您需要了解的所有信息. (Ev ...

  5. 逻辑回归模型_逻辑回归模型

    点击"蓝字"关注我们吧 1 线性模型的局限性 在线性模型中,一个重要的条件便是响应变量 须服从正态分布.然而,实际问题往往更加复杂, 并不总是满足正态分布的假设. 不同参数的正态分 ...

  6. python实现逻辑回归算法_逻辑回归算法的实现

    前言 在之前的学习中,我们已经学习了逻辑回归算法的具体数学原理及其简单的推导过程,现在,我们可以用python实现逻辑回归的算法了. 环境 python3.6 jupyter-notebook 绘制数 ...

  7. python回归代码_一元回归1_基础(python代码实现)

    机器学习,项目统计联系QQ:231469242 目录 1.基本概念 2.SSE/SSR/SST可视化 3.简单回归分为两类 4.一元回归公式 5.估计的回归公式 6.最小二乘法得到回归线应该穿过中心点 ...

  8. python中用于表示逻辑与、逻辑或、逻辑非运算_逻辑非,逻辑与,逻辑或和非,与,或的区别...

    展开全部 1 "!"(逻辑非)."&&"(逻辑与)."||"(逻辑或)是三种逻辑运算符. 2 "逻辑与" ...

  9. 机器学习系列(1)_逻辑回归初步

    转载自: 机器学习系列(1)_逻辑回归初步 - 寒小阳 - 博客频道 - CSDN.NET http://blog.csdn.net/han_xiaoyang/article/details/4912 ...

最新文章

  1. 从配置文件的角度去了解Yii2
  2. Maximum Subarray with Sum/ Multiply
  3. C++输出UNICODE字符集
  4. 抓取mooc中国随笔
  5. Android_JNI编程入门
  6. doris的tablet副本修复相关情况总结
  7. DataStore详解
  8. 查看360极速浏览器保存的密码方法步骤
  9. android图片布局填冲满,Android图片裁剪库——cropper使用,完美解决图片填充不满布局问题...
  10. 艺赛旗(RPA)国家企业信用信息公示系统验证码破解(一)
  11. c 实现走迷宫流程图_[求助]:迷宫问题 流程图
  12. UI设计中聊天气泡框的设计技巧
  13. 1+X 云计算平台运维与开发(初级)
  14. 英特尔2018年处理器一览
  15. 2017 Material design 第三章第三节《图像》
  16. 欧拉定理——数论定理
  17. 代理服务器拒绝连接(无法连接到代理服务器)的解决办法
  18. ICP许可证是什么证?ICP备案和ICP许可证的区别?
  19. 图像处理项目——基于机器视觉技术的人脸在线识别系统设计
  20. python·pygame小游戏--中国象棋(原码附上,免费下载)

热门文章

  1. 世界睡眠日PPT模板
  2. 简单聊聊 Perlin 噪声(下篇)
  3. 日常好用直播软件系统分享(二)
  4. 表头,表注需要句号吗?
  5. 10分钟训练属于你的AI变声器
  6. IDEA解决“找不到包”或“找不到符号”,但代码没有错误的问题
  7. 对C++程序内存管理的精雕细琢
  8. 利用C语言创建文件并输入文件内容。
  9. 惊!钉钉CEO离职创业跨境出海领域;中欧班列跑出新高度;浙江数字化步伐再加速…|洞悉跨境
  10. Problems During Content Assist Eclipse代码提示错误,代码助手出错