參考:http://scikit-learn.org/stable/modules/random_projection.html

The sklearn.random_projection module
通过trading accuracy(可控的范围)来降维数据。提高效率。实现了两类unstructured random matrix:: Gaussian
random matrix
 and sparse
random matrix
.

理论基础:the Johnson-Lindenstrauss
lemma (quoting Wikipedia)
,该引理大概内容为:

In
mathematics, the Johnson-Lindenstrauss lemma is a result concerning low-distortion embeddings(低失真嵌入) of points from high-dimensional into low-dimensional Euclidean space. The lemma states that
a small set of points in a high-dimensional space can be embedded into a space of much lower dimension in such a way that distances between the points are nearly preserved. The map used for the embedding is at least Lipschitz, and can even
be taken to be an orthogonal projection(正交投影).  



 the sklearn.random_projection.johnson_lindenstrauss_min_dim 能够仅通过样本的数量来得到随机子空间的保守最小维度(同一时候保证向低维空间随机投影时造成的失真是bounded的,estimates
conservatively the minimal size of the random subspace to guarantee a bounded distortion introduced by the random projection):

>>> from sklearn.random_projection import johnson_lindenstrauss_min_dim
>>> johnson_lindenstrauss_min_dim(n_samples=1e6, eps=0.5)
663

scikit-learn:4.5. Random Projection的更多相关文章

  1. scikit learn 模块 调参 pipeline+girdsearch 数据举例:文档分类 (python代码)

    scikit learn 模块 调参 pipeline+girdsearch 数据举例:文档分类数据集 fetch_20newsgroups #-*- coding: UTF-8 -*- import ...

  2. (原创)(三)机器学习笔记之Scikit Learn的线性回归模型初探

    一.Scikit Learn中使用estimator三部曲 1. 构造estimator 2. 训练模型:fit 3. 利用模型进行预测:predict 二.模型评价 模型训练好后,度量模型拟合效果的 ...

  3. (原创)(四)机器学习笔记之Scikit Learn的Logistic回归初探

    目录 5.3 使用LogisticRegressionCV进行正则化的 Logistic Regression 参数调优 一.Scikit Learn中有关logistics回归函数的介绍 1. 交叉 ...

  4. Scikit Learn: 在python中机器学习

    转自:http://my.oschina.net/u/175377/blog/84420#OSC_h2_23 Scikit Learn: 在python中机器学习 Warning 警告:有些没能理解的 ...

  5. Machine Learning/Random Projection

    这次突然打算写点dimension reduction的东西, 虽然可以从PCA, manifold learning之类的东西开始, 但很难用那些东西说出好玩的东西. 这次选择的是一个不太出名但很有 ...

  6. Random Projection在k-means的应用

    1. 随机投影 (Random Projection) 首先,这是一种降维方法.之前已经介绍过相对普遍的PCA的降维方法,这里介绍另一种降维方法Random Project.相比于PCA,他的优势可以 ...

  7. Random Projection

    Random Projection在k-means的应用   1. 随机投影 (Random Projection) 首先,这是一种降维方法.之前已经介绍过相对普遍的PCA的降维方法,这里介绍另一种降 ...

  8. objective-c 中随机数的用法 3种:arc4random() 、random()、CCRANDOM_0_1()

    oc 中随机数的用法(arc4random() .random().CCRANDOM_0_1() 1).arc4random() 比较精确不需要生成随即种子 使用方法 : 通过arc4random() ...

  9. Java基础知识强化81:Math类random()方法之获取任意范围的随机数案例(面试题)

    1. 需求:设计一个方法,可以实现获取任意范围内的随机数 分析:使用方法random()如下: public static double random() 注:Returns a pseudo-ran ...

随机推荐

  1. java集合(ArrayList,Vector,LinkedList,HashSet,TreeSet的功能详解)

    说起集合,我们会潜意识里想到另外一个与之相近的名词——数组,OK!两者确实有相似之处,但也正是这点才是我们应该注意的地方,下面简单列出了两者的区别(具体功能的不同学习这篇文章后就会明白了): 数组 长 ...

  2. javacc学习总结

    在学javacc的时候.发现一个问题,见下: Example.jj文件 PARSER_BEGIN(Example) public class Example { public static void ...

  3. 《jQuery技术内幕:深入解析jQuery架构设计与实现原理》

    <jQuery技术内幕:深入解析jQuery架构设计与实现原理> 基本信息 作者: 高云 出版社:机械工业出版社 ISBN:9787111440826 上架时间:2014-1-10 出版日 ...

  4. 一致性hash在分布式系统中的应用

    场景 如果要设计一套KV存储的系统,用户PUT一个key和value,存储到系统中,并且提供用户根据key来GET对应的value.要求随着用户规模变大,系统是可以水平扩展的,主要要解决以下几个问题. ...

  5. 权限项目总结(四) shiro 授权

    概述 Authorization(授权):不难理解,授权就是用来控制当前訪问用户在訪问系统资源权限. 这个词也做证书的解释,从证书这个角度来讲,推断是否拥有对资源訪问的权限时.当前用户须要提供证书. ...

  6. [Windows]_[删除非空文件夹的注意要点]

    场景: 1. 有时候程序须要生成一些暂时文件夹和暂时文件,在程序退出时须要删除,这时候用win32的api就可以完毕需求.自己遍历文件夹一个个removefile并非高效率的做法. //注意: //1 ...

  7. pacific-atlantic-water-flow(不错)

    https://leetcode.com/problems/pacific-atlantic-water-flow/ // 其实,这道题目可以参考前面的那道:Trapping Rain Water I ...

  8. Android -- Sqlite事务

    这也是通过Android Juint来实现的. 基于上一次的工程继续,上一次工程传送门:<Android–Android Juint 与 Sqlite> http://www.cnblog ...

  9. Google帮助IE浏览器实现对SVG支持

    可缩放矢量图形(SVG)的意识就是一个用于描述二维矢量图形的一种开放图形格式. SVG现在已经能够广泛得应用到许多的项目当中,包括KDE和维基百科等.但是 Internet Explorer浏览器的内 ...

  10. (笔试题)N!的三进制数尾部0的个数

    题目: 用十进制计算30!(30的阶乘),将结果转换成3进制进行表示的话,该进制下的结果末尾会有____个0. 思路: 这道题与上一篇博文N!尾部连续0的个数的思路是一样的. 计算N!下三进制结果末尾 ...