參考: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. [翻译] TSActivityIndicatorView 自定义指示器

    TSActivityIndicatorView 自定义指示器 https://github.com/tomkowz/TSActivityIndicatorView TSActivityIndicato ...

  2. thymleaf th:if标签

    1.概念 <table> <tr> <th>NAME</th> <th>PRICE</th> <th>IN STOC ...

  3. @ERR Unsupported CONFIG parameter: notify-keyspace-events

    Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Unsupported CONFIG parameter: noti ...

  4. 实现SQL Server中的切割字符串SplitString函数

    有时我们要用到批量操作时都会对字符串进行拆分,可是SQL Server中却没有自带Split函数,所以要自己来实现了.没什么好说的,需要的朋友直接拿去用吧 SET ANSI_NULLS ON GO S ...

  5. Android NDK开发----- JNI多线程

    一.概述 JNI编程和Linux上的C/C++编程还是挺相似的,每次java调用JNI中的函数时都会传入有关JVM的一些参数(如JNIEnv,jobject),每次JNI回调java中的方法时都要通过 ...

  6. flex创建hashMap

    1,定义hashMap的接口. import flash.events.IEventDispatcher; import mx.events.CollectionEvent; /** *  Dispa ...

  7. 基于Spring Boot和Spring Cloud实现微服务架构学习--转

    原文地址:http://blog.csdn.net/enweitech/article/details/52582918 看了几周spring相关框架的书籍和官方demo,是时候开始总结下这中间的学习 ...

  8. Spark job server原理初探

    Spark job server是一个基于Spark的服务系统,提供了管理SparkJob,context,jar的RestFul接口. 专注标注原文链接 http://www.cnblogs.com ...

  9. 给Linux初学者的七个建议,值得一读

    刚开始使用Linux时你也许会感到不习惯,许多高手也都有这样的经历.毕竟,曾经他们也都是新手.但是现在Linux团体已经在为新用户提供有关指南, 手册和基本的技术文档来使他们尽快上手方面做的相当出色. ...

  10. android学习的网站收集

    1. http://mob.com/#/index 提供分享等统一解决方案 2. http://bbs.apkbus.com/explore/ 这个类似的quroa问答模块,覆盖不错.就是人气,稍差. ...