定义:

In statistical surveys, when subpopulations within an overall population vary, it is advantageous to sample each subpopulation (stratum) independently.Stratification is the process of dividing members of the population into homogeneous subgroups before sampling. The strata should be mutually exclusive: every element in the population must be assigned to only one stratum. 

简言之,将数据集划分为相同标签的子集,然后再在每个子集进行独立的抽样

Advantages[edit]

优点是:即使在样本空间的概率密度急剧变化的情况,层次抽样也能保证不同(概率密度)层次的样本的抽取概率的精确性。

If population density varies greatly within a region, stratified sampling will ensure that estimates can be made with equal accuracy in different parts of the region, and that comparisons of sub-regions can be made with equal statistical power.

Randomized stratification can also be used to improve population representativeness in a study.

Disadvantages[edit]

Stratified sampling is not useful when the population cannot be exhaustively partitioned into disjoint subgroups. It would be a misapplication of the technique to make subgroups' sample sizes proportional to the amount of data available from the subgroups, rather than scaling sample sizes to subgroup sizes (or to their variances, if known to vary significantly

spark MLlib 概念 2:Stratified sampling 层次抽样的更多相关文章

  1. spark MLlib 概念 6:ALS(Alternating Least Squares) or (ALS-WR)

    Large-scale Parallel Collaborative Filtering for the Netflix Prize http://www.hpl.hp.com/personal/Ro ...

  2. spark MLlib 概念 5: 余弦相似度(Cosine similarity)

    概述: 余弦相似度 是对两个向量相似度的描述,表现为两个向量的夹角的余弦值.当方向相同时(调度为0),余弦值为1,标识强相关:当相互垂直时(在线性代数里,两个维度垂直意味着他们相互独立),余弦值为0, ...

  3. spark MLlib 概念 4: 协同过滤(CF)

    1. 定义 协同过滤(Collaborative Filtering)有狭义和广义两种意义: 广义协同过滤:对来源不同的数据,根据他们的共同点做过滤处理. Collaborative filterin ...

  4. spark MLlib 概念 3: 卡方分布(chi-squared distribution)

    数学定义[编辑] 若k个随机变量.--.是相互独立,符合标准正态分布的随机变量(数学期望为0.方差为1),则随机变量Z的平方和 被称为服从自由度为 k 的卡方分布,记作 Definition[edit ...

  5. spark MLlib 概念 1:相关系数( PPMCC or PCC or Pearson's r皮尔森相关系数) and Spearman's correlation(史匹曼等级相关系数)

    皮尔森相关系数定义: 协方差与标准差乘积的商. Pearson's correlation coefficient when applied to a population is commonly r ...

  6. Spark Mllib里的分布式矩阵(行矩阵、带有行索引的行矩阵、坐标矩阵和块矩阵概念、构成)(图文详解)

    不多说,直接上干货! Distributed  matrix : 分布式矩阵 一般能采用分布式矩阵,说明这数据存储下来,量还是有一定的.在Spark Mllib里,提供了四种分布式矩阵存储形式,均由支 ...

  7. Spark Mllib里的本地矩阵概念、构成(图文详解)

    不多说,直接上干货! Local matrix:本地矩阵 数组Array(1,2,3,4,5,6)被重组成一个新的2行3列的矩阵. testMatrix.scala package zhouls.bi ...

  8. Spark Mllib里的向量标签概念、构成(图文详解)

    不多说,直接上干货! Labeled point: 向量标签 向量标签用于对Spark Mllib中机器学习算法的不同值做标记. 例如分类问题中,可以将不同的数据集分成若干份,以整数0.1.2,... ...

  9. Spark Mllib里的本地向量集(密集型数据集和稀疏型数据集概念、构成)(图文详解)

    不多说,直接上干货! Local  vector : 本地向量集 由两类构成:稀疏型数据集(spares)和密集型数据集(dense) (1).密集型数据集 例如一个向量数据(9,5,2,7),可以设 ...

随机推荐

  1. 本人亲测-C#常用工具类

    /* * HTTP接口工具类 */ public class HttpUitls { /* * get请求 */ public static string Get(string Url) { //Sy ...

  2. ELF文件格式理解

    ELF(Executable and Linking Format)是一种对象文件的格式,用于定义不同类型的对象文件(Object files)中都放了什么东西.以及都以什么样的格式去放这些东西.它自 ...

  3. ubuntu终端安装ss

    大概就是这样

  4. Delphi 触发异常的方法

  5. (持续更新中~~~)kafka--消息引擎与分布式流处理平台

    kafka概述 kafka是一个分布式的基于发布/订阅模式的消息队列(message queue),一般更愿意称kafka是一款开源的消息引擎系统,只不过消息队列会耳熟一些.kafka主要应用于大数据 ...

  6. paramiko:实现ssh协议,对linux服务器资源的访问

    介绍 网络传输是遵循协议的,比如SSH,paramiko则是实现了SSHv2协议的一个python库(底层使用的是cryptography).有了paramiko之后,我们便可以通过python使用s ...

  7. deep_learning_Function_rnn_cell.BasicLSTMCell

    tf.nn.rnn_cell.BasicLSTMCell(n_hidden, forget_bias=1.0, state_is_tuple=True): n_hidden表示神经元的个数,forge ...

  8. c++ 简单的动态银河星空绘制(类应用)

    话不多说直接贴代码: #include <graphics.h> #include <time.h> #include <conio.h> #define MAXS ...

  9. Win10下注册APlayer组件的正确姿势

    1. 官网下载SDK 和 解码器 APlayer媒体播放引擎 2.解压SDK和解码器,把解码器codecs文件夹内所有文件复制到SDK文件夹内的bin\codecs目录里面 3.使用管理员权限打开CM ...

  10. libusb-test

    /******************************************************************************** * * File Name : li ...