參考: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. mysql TO_DAYS()函数

    TO_DAYS(date)给定一个日期date, 返回一个天数 (从年份0开始的天数 ).   例: select TO_DAYS(NOW()); +----------------+ | TO_DA ...

  2. highchart demo

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.c ...

  3. qsort(),sort()排序函数

    一.qsort()函数 功 能: 使用快速排序例程进行排序 头文件:stdlib.h 用 法: void qsort(void *base,int nelem,int width,int (*fcmp ...

  4. MySQL 中文乱码解决

    測试环境:服务端和client均为win7,MySql数据库.表字符集为utf-8,字段字符集与表一致. 1.使用mysql命令进行操作时的乱码问题解决. (1)设置当前字符集 set names g ...

  5. Jenkins自动部署到(远程)tomcat服务器

    Jenkins的流程: 1.从版本控制中获取代码 ->2. 使用maven编译生成相应的包(jar,war) ->3. 部署到指定的地点. 其中2.主要是解决依赖的问题,或许你需要先mvn ...

  6. java学习笔记13--反射机制与动态代理

    本文地址:http://www.cnblogs.com/archimedes/p/java-study-note13.html,转载请注明源地址. Java的反射机制 在Java运行时环境中,对于任意 ...

  7. PHP实现链表

    看了很久数据结构但是没有怎么用过,在网上看到了关于PHP的数据结构,学习了一下,与大家一起分享一下. 简短不割                                              ...

  8. 清除linux系统的多余引导

    由于我把系统给升级(update)了,在grub引导模式出现新旧版本(Grub与Grub2)的引导系统分别为正常启动和进入恢复模式各2个引导项,如下图显示:百度找不到相关或类似的教程,只好半夜起来研究 ...

  9. Oracle日期周具体解释以及周開始结束时间计算

    1 ORACLE中周相关知识描写叙述 1.1           日期格式化函数 TO_CHAR(X [,FORMAT]):将X按FORMAT格式转换成字符串. X是一个日期,FORMAT是一个规定了 ...

  10. Linux系统配置VSFTP软件详解

    Linux系统配置VSFTP软件详解 出处 http://www.sudu.cn/service/detail.php?id=11656 vsftpd.conf 是vsftpd的配置文件,用来控制vs ...