scikit-learn(project中用的相对较多的模型介绍):1.14. Semi-Supervised
參考:http://scikit-learn.org/stable/modules/label_propagation.html
The semi-supervised estimators insklearn.semi_supervised are
able to make use of this additional unlabeled data to better capture the shape of the underlying data distribution and generalize better to new samples. These algorithms can perform well when we have a very small amount of labeled points and a large amount
of unlabeled points.
Unlabeled entries in y:It is important to assign an identifier to unlabeled points along with the labeled data when training
the model with the fit method.
The identifier that this implementation uses is the integer value .
标签传播算法(Label propagation):
特点:
1)分类和回归问题均适用
2)能够使用kernel methods将数据映射到其它维度空间。
scikit-learn提供了两个标签传播模型:LabelPropagation and LabelSpreading. Both
work by constructing a similarity graph over all items in the input dataset.
两者差别在于:对原始label分布的图模型和夹紧效果(clamping
effect)的similarity matrix的改动程度。所谓的夹紧效果,就是同意两个模型change true ground labeled data的weight。
LabelPropagation适用“硬夹紧(hard
clamping),即alpha=1。
假设令alpha=0.8,这意味着我们将保留原有的80%的标签分布。但该算法的信任的分布度也会有20%的影响。
LabelPropagation使用从没有不论什么改动的原始数据中构造的similarity
matrix。而LabelSpreading最小化一个带有正规项的loss function,从而对noise鲁棒。
标签传播模型有两个内置的kernel
methods,不同的kernel对算法的可扩展性和性能都有影响:
The
RBF kernel will produce a fully connected graph which is represented in memory by a dense matrix. This matrix may be very large and combined with the cost of performing a full matrix multiplication calculation for each iteration of the algorithm can lead to
prohibitively long running times. On the other hand, the KNN kernel will produce a much more memory-friendly sparse matrix which can drastically reduce running times.
Examples
scikit-learn(project中用的相对较多的模型介绍):1.14. Semi-Supervised的更多相关文章
- scikit-learn(project中用的相对较多的模型介绍):2.3. Clustering(可用于特征的无监督降维)
參考:http://scikit-learn.org/stable/modules/clustering.html 在实际项目中,我们真的非常少用到那些简单的模型,比方LR.kNN.NB等.尽管经典, ...
- scikit learn 模块 调参 pipeline+girdsearch 数据举例:文档分类 (python代码)
scikit learn 模块 调参 pipeline+girdsearch 数据举例:文档分类数据集 fetch_20newsgroups #-*- coding: UTF-8 -*- import ...
- (原创)(三)机器学习笔记之Scikit Learn的线性回归模型初探
一.Scikit Learn中使用estimator三部曲 1. 构造estimator 2. 训练模型:fit 3. 利用模型进行预测:predict 二.模型评价 模型训练好后,度量模型拟合效果的 ...
- (原创)(四)机器学习笔记之Scikit Learn的Logistic回归初探
目录 5.3 使用LogisticRegressionCV进行正则化的 Logistic Regression 参数调优 一.Scikit Learn中有关logistics回归函数的介绍 1. 交叉 ...
- Scikit Learn: 在python中机器学习
转自:http://my.oschina.net/u/175377/blog/84420#OSC_h2_23 Scikit Learn: 在python中机器学习 Warning 警告:有些没能理解的 ...
- Scikit Learn
Scikit Learn Scikit-Learn简称sklearn,基于 Python 语言的,简单高效的数据挖掘和数据分析工具,建立在 NumPy,SciPy 和 matplotlib 上.
- Linear Regression with Scikit Learn
Before you read This is a demo or practice about how to use Simple-Linear-Regression in scikit-lear ...
- 【359】scikit learn 官方帮助文档
官方网站链接 sklearn.neighbors.KNeighborsClassifier sklearn.tree.DecisionTreeClassifier sklearn.naive_baye ...
- 如何使用scikit—learn处理文本数据
答案在这里:http://www.tuicool.com/articles/U3uiiu http://scikit-learn.org/stable/modules/feature_extracti ...
随机推荐
- 用键盘控制DIV && Div闪烁
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- PS如何为图片添加四面投影
如图所示,像四周的投影 很像Areo效果的Windows7. 用这样的图片做成PNG透明的效果非常好. 我们不妨仔细研究上图的两个角,发现其实只是简单的投影效果而已. 简单的使用投影效果即可.注意混合 ...
- 关于web后门权限防删的一个新思路
见土司有一帖子 具体看下面连接 https://www.t00ls.net/thread-26444-1-2.html 这是php的 其实IIS也有类似的 这是MSF生成的一个ASPX执行shellc ...
- MySQL的查询,子查询,联结查询,联合查询
MySQL的查询,子查询,联结查询,联合查询 一.mysql查询的五种子句where(条件查询).having(筛选).group by(分组).order by(排序).limit(限制结果数) 二 ...
- ionic开发之优化目录结构
当我们来个ionic start circleApp tabs的时候,会自动生成目录结构,基本如下: 显然这不利于项目的管理,当你的项目越来越复杂的时候,这是不够的.我们必须要按照模块进行文件夹的方式 ...
- PHP中session详解
SESSION 的数据保存在哪里呢? 当然是在服务器端,但不是保存在内存中,而是保存在文件或数据库中. 默认情况下,PHP.ini 中设置的 SESSION 保存方式是 files(session ...
- 如何用PS快速的批量制作连续号码数字编号图解
如何用PS快速的批量制作连续号码数字编号图解 大家好,今天太原博飞设计培训小编就告诉大家如用PS快速的制作连续数字编号,在工作中尤其是大型活动的有时候制作连续的号码牌,少还好,如果上百上千个,那就辛苦 ...
- 文件——文件指针——文件练习(随机产生N个手机号)——自动关文件
python 2 3file() #python 2读模式 写模式 追加模式 只要沾上了r,文件不存的就会报错读模式 r 读写模式 r+(可以写)1.不能写2.文件不存在报错f=open('123', ...
- JDBC技术总结(二)
上一节主要讲了JDBC的基本操作,这一节主要总结一下JDBC如何处理大文本.如何处理图片以及进行批处理. 1.JDBC处理大文本 在MySQL中,大文本是text类型,使用Java操作数据库中的大文本 ...
- 如何在aspx页面中使用ascx控件(用户自定义的一个控件)?
aspx是页面文件ascx是用户控件,用户控件必须嵌入到aspx中才能使用. ascx是用户控件,相当于模板 其实ascx你可以理解为Html里的一部分代码,只是嵌到aspx里而已,因为aspx内容多 ...