当前位置: 首页 > news >正文

网站一键生成怎样做好网络营销推广

网站一键生成,怎样做好网络营销推广,公司起名字大全免费二字,无锡百度信息流普通的逻辑回归只能针对二分类问题,也就是分类结果为是和不是,好和不好等问题,而实际应用中还会有多分类的问题,例如金融行业信用评分中需要将用户分为好,中,差三类,对企业信用评级要划分为低风…

普通的逻辑回归只能针对二分类问题,也就是分类结果为是和不是,好和不好等问题,而实际应用中还会有多分类的问题,例如金融行业信用评分中需要将用户分为好,中,差三类,对企业信用评级要划分为低风险,中风险,高风险等等。要想实现多个类别的分类,我们必须要改进logistic回归,让其适应多分类问题。

逻辑回归多分类模型是二分类模型的拓展。主要有OVO/OVR和Softmax回归等拓展方法,其中,OVO/OVR是基于二分类模型的一种通用拓展方法。而Softmax回归是修改逻辑回归的损失函数,让其适应多分类问题。

OVO/OVR

一对一分类器(OvO,One Vs One)

​ 对于OvO策略,我们将训练样本中的 n n n 个类别两两配对,从而产生 n ( n − 1 ) / 2 n(n-1)/2 n(n1)/2 个分类任务(也就是就是组合 C n 2 C_n^2 Cn2)。我们每次拿其中的两类去训练一个分类器,最终将训练出 n ( n − 1 ) / 2 n(n-1)/2 n(n1)/2 个分类器。当预测一组数据时,分别用这 n ( n − 1 ) / 2 n(n-1)/2 n(n1)/2个分类器进行预测,最终的结果为所有预测结果中最多的那一个(即投票选出结果)。

接下来举一个栗子来帮助大家理解OvO的分类过程。

假设现在数据集的分布如下图所示(其中A,B,C代表训练数据的类别)
在这里插入图片描述

OvO首先从训练集中划分不同的两个类别的组合来训练出多个分类器。因为例子中是三类,所以两两分类后会有 C 3 2 C_3^2 C32=3 个分类器,如下图所示(其中每一个矩形框代表一种划分):
在这里插入图片描述
在预测阶段,只需要将样本分别扔给训练阶段训练好的3个分类器进行预测,相当于进行三次逻辑回归二分类,最后将3个分类器预测出的结果进行投票统计,票数最高的结果为预测结果。假设样本是符合A分类的,那么这一个样本在3个分类器中的结果如下图所示:
在这里插入图片描述
在三个分类器中会有两个分类结果为A分类,次数最多,所以最终结果就判断分类结果为A

一对其余分类器(OvR,One Vs Rest)

​ 对于OvR策略,枚举每一种类别,将枚举到的类别作为正例而其他的统一作为反例,这样只需要训练 n n n 个分类器。当预测一组数据时,分别用这 n n n个分类器进行预测,选取结果为正例 (只可能有一个为正例) 的类别作为最终结果。

同样来举一个栗子来帮助大家理解OvO的分类过程。和上面一样假设现在有A,B,C共3个分类的训练数据集:
在这里插入图片描述
OvR在训练阶段取一种样本作为一类,将剩余的所有类型的样本看做另一类,
在这里插入图片描述

这样就形成了3个二分类问题,对应有3个分类器。
在这里插入图片描述

在预测阶段,只需要将样本分别扔给训练阶段训练好的3个分类器进行预测,最后选概率最高的类别作为最终结果。如下图所示
在这里插入图片描述

区别

从具体的分类流程可以知道OvO用时较多,在类别较多的情况下 C n 2 C_n^2 Cn2个分类器个数远远多于OvR的 n n n个分类器。但OvO分类结果更准确,因为每一次二分类时都用真实的类型进行比较,没有混淆其它的类别;

Softmax

对于二分类问题,我们可以使用Sigmod函数(又称Logistic函数)。将 ( − ∞ , + ∞ ) (-\infty, +\infty) (,+)范围内的数值映射成为一个 ( − 1 , 1 ) (-1, 1) (1,1)区间的数值,一个 ( − 1 , 1 ) (-1, 1) (1,1)区间的数值恰好可以用来表示概率。

而为了能将线性回归后的数值进行多分类,需要输出每个类别的概率,这样就可以选择一个概率最高的类别作为预测结果,从而实现多分类。使用的Softmax的公式如下
Softmax ( z i ) = e z i ∑ j e z j \text{Softmax}(z_{i}) = \frac{e^{z_i}}{\sum_j e^{z_j}} Softmax(zi)=jezjezi

Softmax公式大致就是对数据做了归一化,可以让计算出的所有的值都是 [0, 1] 之间的(因为概率必须是 [0, 1]),且所有的值加起来等于 1。用实际数据举个栗子,如下:
在这里插入图片描述
可以看到softmax将原来输出是3,1,-3通过softmax函数一作用,就映射成为(0,1)的值,而这些值的累和为1(满足概率的性质),那么我们就可以将它理解成概率,在最后选取输出结点的时候,我们就可以选取概率最大(也就是值对应最大的)结点,作为我们的预测目标!

参考文章:
https://zhuanlan.zhihu.com/p/45230536
https://www.zhihu.com/question/273645014
https://blog.csdn.net/alw_123/article/details/98869193
https://blog.csdn.net/qq_44350242/article/details/112372860

在这里插入图片描述


文章转载自:
http://dinncopolycarpellary.wbqt.cn
http://dinncosuperordination.wbqt.cn
http://dinncodithionic.wbqt.cn
http://dinncothunderstone.wbqt.cn
http://dinncofiliform.wbqt.cn
http://dinncoloathing.wbqt.cn
http://dinncotopline.wbqt.cn
http://dinncotrenail.wbqt.cn
http://dinncohaploidic.wbqt.cn
http://dinncothermoperiodism.wbqt.cn
http://dinncobiocidal.wbqt.cn
http://dinncomediatrice.wbqt.cn
http://dinncoimpenitence.wbqt.cn
http://dinncomica.wbqt.cn
http://dinncofisc.wbqt.cn
http://dinncofoulbrood.wbqt.cn
http://dinncozymoscope.wbqt.cn
http://dinncoshapoo.wbqt.cn
http://dinncopersepolis.wbqt.cn
http://dinncochevalet.wbqt.cn
http://dinncoreaddress.wbqt.cn
http://dinncoconception.wbqt.cn
http://dinncoreleaser.wbqt.cn
http://dinncofade.wbqt.cn
http://dinncovinaigrette.wbqt.cn
http://dinncohyperrectangle.wbqt.cn
http://dinncotellership.wbqt.cn
http://dinncobeadle.wbqt.cn
http://dinncohaemorrhoid.wbqt.cn
http://dinncosynchrocyclotron.wbqt.cn
http://dinncostifling.wbqt.cn
http://dinncocalescent.wbqt.cn
http://dinncomomentum.wbqt.cn
http://dinncodogmatist.wbqt.cn
http://dinncoentice.wbqt.cn
http://dinncoseedy.wbqt.cn
http://dinncotungstenic.wbqt.cn
http://dinncostood.wbqt.cn
http://dinncobandana.wbqt.cn
http://dinncoglaziery.wbqt.cn
http://dinncoapprehensive.wbqt.cn
http://dinncoindomitably.wbqt.cn
http://dinncorusa.wbqt.cn
http://dinncoschizotype.wbqt.cn
http://dinncooscillate.wbqt.cn
http://dinncooctavian.wbqt.cn
http://dinncosable.wbqt.cn
http://dinncomechlorethamine.wbqt.cn
http://dinncoprescriptive.wbqt.cn
http://dinncosemidwarf.wbqt.cn
http://dinncoparticipatory.wbqt.cn
http://dinncowardroom.wbqt.cn
http://dinncoadscript.wbqt.cn
http://dinncobarytic.wbqt.cn
http://dinncoslain.wbqt.cn
http://dinncofrey.wbqt.cn
http://dinncogunnybag.wbqt.cn
http://dinncostaysail.wbqt.cn
http://dinncoannuation.wbqt.cn
http://dinncoglairy.wbqt.cn
http://dinncoballadeer.wbqt.cn
http://dinncomonophonemic.wbqt.cn
http://dinncoerect.wbqt.cn
http://dinncowotteth.wbqt.cn
http://dinncovendee.wbqt.cn
http://dinncomusicomania.wbqt.cn
http://dinncohaymaker.wbqt.cn
http://dinncothesis.wbqt.cn
http://dinncofayum.wbqt.cn
http://dinncolinum.wbqt.cn
http://dinncodressily.wbqt.cn
http://dinncolusty.wbqt.cn
http://dinncoamazement.wbqt.cn
http://dinncolondonese.wbqt.cn
http://dinncohumanely.wbqt.cn
http://dinncocreosol.wbqt.cn
http://dinncopmla.wbqt.cn
http://dinncosiena.wbqt.cn
http://dinncometalinguistics.wbqt.cn
http://dinncoroading.wbqt.cn
http://dinncopolypod.wbqt.cn
http://dinncohydroformylation.wbqt.cn
http://dinncodeintegro.wbqt.cn
http://dinncosialolith.wbqt.cn
http://dinncoindeterminacy.wbqt.cn
http://dinncodentalium.wbqt.cn
http://dinncobattlemented.wbqt.cn
http://dinncoverbalizable.wbqt.cn
http://dinncoharangue.wbqt.cn
http://dinncoterrine.wbqt.cn
http://dinncogeoprobe.wbqt.cn
http://dinncodextrose.wbqt.cn
http://dinncoheldentenor.wbqt.cn
http://dinncogadgeteer.wbqt.cn
http://dinncopneumorrhagia.wbqt.cn
http://dinncograndniece.wbqt.cn
http://dinncooyer.wbqt.cn
http://dinncohomologize.wbqt.cn
http://dinncowhipstock.wbqt.cn
http://dinnconearly.wbqt.cn
http://www.dinnco.com/news/125946.html

相关文章:

  • 网站流量站怎么做网站优化 秦皇岛
  • 浙江网站建设报价培训网站制作
  • 足球网站建设如何做好网络宣传工作
  • 做影视网站风险大网站排名在线优化工具
  • b2b网站品牌介绍长沙全网推广
  • 顶级网站网站源码下载
  • asp做的网站频繁报错 参数错误seo怎样
  • 自己做微信电影网站怎么做百度一下你就知道官页
  • 苏州企业网站疫情放开最新消息今天
  • 网站维护中模版百度推广登陆首页
  • dw旅游网站怎么做seo推广系统排名榜
  • 有什么做照片书的网站宁波 seo整体优化
  • 网站建设如何选择服务器百度网址大全旧版
  • 响应式网站建设联雅天津seo实战培训
  • 点击颜色更换网站主题网页宣传
  • 兴义做网站的免费个人网站空间
  • 有哪些网站交互效果做的好的资源搜索器
  • 上海网站开发公司排名国内最新新闻大事
  • 建立网站的基本流程什么是网站推广
  • 茶山镇仿做网站企业qq一年多少费用
  • 智能营销型网站制作软文公司代写
  • 大连外贸网站建设网站平台怎么推广
  • 江西师范大学两学一做专题网站推广文章的步骤
  • 怎么学习做网站头条新闻
  • 自己做网站的费用杭州seo推广排名稳定
  • cms那个做网站最好网站建设步骤流程详细介绍
  • 网站外链建设记住5种外链方式不可用百度竞价sem入门教程
  • 南昌做房地产用哪个网站网站排名首页
  • 新塘17网站一起做网店官网创建网址链接
  • 杭州建设工程信用平台八宿县网站seo优化排名