Robust Statistics - 2nd Edition
鲁棒统计,现代统计方法, Robust Statistics第二版,学习现代统计方法R○ BUST STAT|STCSSecond editionPeter j, huberProfessor of Statistics, retiredKlosters SwitzerlandEⅣ ezio m. RonchettiProfessor of StatisticsUniversity of Geneva, SwitzerlandWILEYA JOHn WileY SONS INC. PUBliCAtIONCopyrightc 2009 by John Wiley Sons, Inc. All rights reservedPublished by John Wiley sons, Inc, Hoboken, New JerseyPublished simultaneously in CanadaNo part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form orby any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except aspermitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the priorwritten permission of the Publisher, or authorization through payment of the appropriate per-copy fee tothe Copyright Clearance Center, Inc, 222 Rosewood Drive, Danvers, MA 01923, (978)750-8400, fax978)750-4470,oronthewebatwww.copyrigom. requests to the publisher for permission shouldbe addressed to the permissions department John Wiley sons, Inc., 11 1 River Street, Hoboken, NJ07030,(201)748-6011,fax(201)748-6008,oronlineathttp:/www.wileycom/go/permissionLimit of Liability /Disclaimer of Warranty: While the publisher and author have used their best efforts inpreparing this book, they make no representations or warranties with respect to the accuracy orcompleteness of the contents of this book and specifically disclaim any implied warranties ofmerchantability or fitness for a particular purpose. No warranty may be created or extended by salesrepresentatives or written sales materials. The advice and strategies contained herein may not be suitablefor your situation. You should consult with a professional where appropriate. Neither the publisher norauthor shall be liable for any loss of profit or any other commercial damages, including but not limitedto special, incidental, consequential, or other damagesFor general information on our other products and services or for technical support, please contact ourCustomer Care Department within the United States at(800)762-2974, outside the United States at(317)572-3993 or fax(317)572-4002.Wiley also publishes its books in a variety of electronic formats. Some content that appears in print maynot be available in electronic format. For information about wiley products, visit our web site atwww.wileycomLibrary of Congress Cataloging-in-Publication Data:Huber Peter JRobust statistics, second edition/ Peter J. Huber, Elvezio ronchettip. cnIncludes bibliographical references and indeISBN978-0-470-12990-6( cloth)1. Robust statistics. I. Ronchetti. elvezio. II. TitleQA276.H7852009519.5-dc222008033283Printed in the United States of america10987654321To the memory o1John w. tukeyThis Page Intentionally Left BlankCONTENTSPrefacePreface to first editionGeneralities1 Why robust Procedures1. 2 What Should a robust procedure achieve?1.2.1 Robust. Nonparametric and Distribution-Free1.2.2 Adaptive procedures1.2.3 Resistant Procedures1.2. 4 Robustness versus Diagnostics1.2.5 Breakdown point1.3 Qualitative Robustness567888911. 4 Quantitative Robustness1.5 Infinitesimal Aspects141.6 Optimal Robustness171.7 Performance Comparisons18CONTENTS1.8 Computation of robust estimates181.9 Limitations to Robustness Theory202 The Weak Topology and its Metrization23eneral remarks232.2 The Weak Topology232.3 Levy and prohorov metrics272.4 The bounded Lipschitz metric322.5 Frechet and Gateaux derivatives366 Hampels Theorem413 The Basic Types of Estimates453. 1 General Remarks453.2 Maximum Likelihood Type Estimates(M-Estimates)3.2.1 Influence Function of m-estimates73.2.2 Asymptotic Properties of M-Estimates483.2.3 Quantitative and Qualitative Robustness of MEstimates3.3 Linear Combinations of Order Statistics(L-Estimates)3.3.1 Influence Function of -Estimates3.3.2 Quantitative and Qualitative robustness of l-Estimates 593. 4 Estimates Derived from Rank Tests(R-estimates3.4.1 Influence Function of R-Estimates623.4.2 Quantitative and Qualitative robustness of R-Estimates 643.5 Asymptotically Efficient M-, L,and R-Estimates674 Asymptotic Minimax Theory for Estimating Location4.1 General remarks4.2 Minimax bias4.3 Minimax Variance: Preliminaries744. 4 Distributions minimizing fisher Information764.5 Determination of Fo by Variational Methods814.6 Asymptotically Minimax M-Estimates914.7 On the minimax Property for L-and R-estimates954.8 Redescending m-estimates74.9 Questions of Asymmetric Contamination101CONTENTSScale Estimates1055.1 General remarks1055.2 M-Estimates of scale1075.3 L-Estimates of scale5.4 R-Estimates of Scale1125.5 Asymptotically efficient Scale estimates1145.6 Distributions Minimizing fisher Information for Scale5.7 Minimax Properties116 Multiparameter Problemsin Particular Joint Estimationof Location and scale1256. 1 General remarks1256.2 Consistency of M-Estimates1266.3 Asymptotic Normality of M-Estimates1306. 4 Simultaneous m-Estimates of Location and scale1336.5 M-Estimates with Preliminary Estimates of Scale1376.6 Quantitative robustness of Joint Estimates of Location and Scale 1396.7 The Computation of M-Estimates of Scale14368Studentizing1457 Regression1497. 1 General remarks1497. 2 The Classical Linear Least Squares Case1547. 2.1 Residuals and Outliers1587.3 Robustizing the Least Squares Approach1607.4 Asymptotics of robust regression Estimates163741 The Cases hp2→0 and hp→07.5 Conjectures and Empirical Results1687.5.1 Symmetric Error Distributions1687.5.2 The Question of Bias1687.6 Asymptotic Covariances and Their estimation1707. 7 Concomitant Scale estimates1727.8 Computation of Regression M-Estimates1757.8.1 The Scale Step1767.8.2 The Location Step with Modified residuals1787.8.3 The Location Step with Modified Weights179CONTENTS7.9 The Fixed Carrier Case: What Size hi?1867. 10 Analysis of Variance1907. 11 LI-estimates and Median polish1937. 12 Other Approaches to Robust Regression1958 Robust Covariance and Correlation Matrices1998. 1 General remarks8.2 Estimation of Matrix Elements Through robust Variances2038.3 Estimation of Matrix Elements Through robust Correlation2048.4 An Affinely equivariant approach2108.5 Estimates Determined by Implicit Equations2128.6 Existence and Uniqueness of Solutions2148.6. 1 The Scatter estimate v2148.6.2 The Location estimate t2198.6.3 Joint Estimation of t and y2208.7 Influence Functions and Qualitative robustness2208.8 Consistency and asymptotic normality2238.9 Breakdown Point48.10 Least informative distributions2258.1058. 10.2 Covariance2278.11 Some Notes on Computation2339 Robustness of Design2399.1 General remarks2399.2 Minimax Global Fit9.3 Minimax Slope24610 Exact Finite Sample Results24910.1 General Remarks24910.2 Lower and Upper Probabilities and Capacities25010.2.1 2-Monotone and 2-Alternating Capacities25510.2.2 Monotone and Alternating Capacities of Infinite Order 25810.3 Robust Tests25910.3. 1 Particular Cases26510.4 Sequential Tests267
- 2020-12-03下载
- 积分:1
Google word2vec算法 数学原理
文档是 word2vec 算法 数学原理详解。word2vec是google的一个开源工具,能够仅仅根据输入的词的集合计算出词与词直接的距离,既然距离知道了自然也就能聚类了,而且这个工具本身就自带了聚类功能,很是强大。32预备知识本节介绍word2v中将用到的一些重要知识点,包括 sigmoid函数、 Bccs公式和Huffman编码等821 sigmoid函数sigmoid函数是神经网络中常用的激活函数之一,其定义为1+e该函数的定义域为(-∞,+∞),值域为(0,1).图1给出了 sigmoid函数的图像0.56图1 sigmoid函数的图像sigmoid函数的导函数具有以下形式(x)=0(x)1-0(x)由此易得,函数loga(x)和log(1-0(x)的导函数分别为log a(a)-1 a(a),log(1 o(a))l-a(a),(2.1)公式(2.1)在后面的推导中将用到32.2逻辑回归生活中经常会碰到二分类问题,例如,某封电子邮件是否为垃圾邮件,某个客户是否为潜在客户,某次在线交易是否存在欺诈行为,等等设{(x;)}温1为一个二分类问题的样本数据,其中x∈Rn,∈{0,1},当v=1时称相应的样本为正例当v=0时称相应的样本为负例利用 sigmoid函数,对于任意样本x=(x1,x2,…,xn),可将二分类问题的 hypothesis函数写成h(x)=o(6o+b1x1+62+…+bnxn)其中θ=(0,61,…,On)为待定参数.为了符号上简化起见,引入x0=1将x扩展为(x0,x1,x2,……,xn),且在不引起混淆的情况下仍将其记为ⅹ.于是,he可简写为取阀值T=0.5,则二分类的判别公式为ho(x)≥0.5:X)=0,ha(x)6),可分别用000001、010、011、100、101对“A,E,R,T,F,D”进行编码发送,当对方接收报文时再按照三位一分进行译码显然编码的长度取决报文中不同字符的个数.若报文中可能出现26个不同字符,则固定编码长度为5(25=32>26).然而,传送报文时总是希望总长度尽可能短.在实际应用中各个字符的出现频度或使用次数是不相同的,如A、B、C的使用颗率远远高于X、Y、Z,自然会想到设计编码时,让使用频率高的用短码,使用频率低的用长码,以优化整个报文编码为使不等长编码为前缀编码(即要求一个字符的编码不能是另一个字符编码的前缀),可用字符集中的每个字符作为叶子结点生成一棵编码二叉树,为了获得传送报文的最短长度,可将每个字符的岀现频率作为字符结点的权值赋于该结点上,显然字使用频率越小权值起小,权值越小叶子就越靠下,于是频率小编码长,频率高编码短,这样就保证了此树的最小带权路径长度,效果上就是传送报文的最短长度.因此,求传送报文的最短长度问题转化为求由字符集中的所有字符作为叶子结点,由字符出现频率作为其权值所产生的 Huffman树的问题.利用 Huffman树设计的二进制前缀编码,称为 Huffman编码,它既能满足前缀编码的条件,又能保证报文编码总长最短本文将介绍的word2ve工具中也将用到 Huffman编码,它把训练语料中的词当成叶子结点,其在语料中岀现的次数当作权值,通过构造相应的 Huffman树来对每一个词进行Huffman编码图3给岀了例2.1中六个词的 Huffman编码,其中约定(词频较大的)左孩子结点编码为1,(词频较小的)右孩子编码为0.这样一来,“我”、“喜欢”、“观看”、“巴西”、“足球”、“世界杯”这六个词的 Huffman编码分别为0,111,110,101,1001和100000欢观有巴西足球图3 Huffman编码示意图注意,到目前为止关于 Huffman树和 Huffman编码,有两个约定:(1)将权值大的结点作为左孩子结点,权值小的作为右孩子结点;(②)左孩子结点编码为1,右孩子结点编码为0.在word2vee源码中将权值较大的孩子结点编码为1,较小的孩子结点编码为θ.为亐上述约定统一起见,下文中提到的“左孩子结点”都是指权值较大的孩子结点3背景知识word2vec是用来生成词向量的工具,而词向量与语言模型有着密切的关系,为此,不妨先来了解一些语言模型方面的知识83.1统计语言模型当今的互联网迅猛发展,每天都在产生大量的文本、图片、语音和视频数据,要对这些数据进行处理并从中挖掘出有价值的信息,离不开自然语言处理( Nature Language processingNIP)技术,其中统计语言模型( Statistical language model)就是很重要的一环,它是所有NLP的基础,被广泛应用于语音识别、机器翻译、分词、词性标注和信息检索等任务例3.1在语音识别亲统中,对于给定的语音段Voie,需要找到一个使概率p(Tcrt| Voice最大的文本段Tert.利用 Bayes公式,有P(Teact Voice)p(VoiceTert)p(Text)P(Veonce其中p( Voice Teat)为声学模型,而p(Tert)为语言模型(l8])简单地说,统计语言模型是用来计算一个句子的概率的概率模型,它通常基于一个语料库来构建那什么叫做一个句子的概率呢?假设W=m1:=(n1,w2,…,tr)表示由T个词1,2,…,ur按顺序构成的一个句子,则n,U2,…,wr的联合概率p(W)=p(u1)=p(u1,u2,…,r)就是这个句子的概率.利用 Baves公式,上式可以被链式地分解为1)=p(u1)·p(u2l1)·p(vai)…p(ur1-)3.1其中的(条件)概率p(1),p(U2mn1),p(u3),…,p(urln1-1)就是语言模型的参数,若这些参数巳经全部算得,那么给定一个句子1,就可以很快地算出相应的p(1)了看起来妤像很简单,是吧?但是,具体实现起来还是有点麻烦.例如,先来看看模型参数的个数.刚才是考虑一个给定的长度为T的句子,就需要计算T个参数.不妨假设语料库对应词典D的大小(即词汇量)为N,那么,如果考虑长度为T的任意句子,理论上就有N种可能,而每种可能都要计算T个参数,总共就需要计算TN个参数.当然,这里只是简单估算,并没有考虑重复参数,但这个量级还是有蛮吓人.此外,这些概率计算好后,还得保存下来,因此,存储这些信息也需要很大的內存开销此外,这些参数如何计算呢?常见的方法有 II-gram模型、决策树、最大熵模型、最大熵马尔科夫模型、条件随杋场、神经网络等方法.本文只讨论n-gram模型和神经网络两种方法.首先来看看n-gram模型32n-gram模型考虑pko4-)(k>1)的近似计算.利用 Baves公式,有p(wr wi)P(uP(w根据大数定理,当语料库足够大时,p(k4-1)可近似地表示为P(wwi)count(wi)(3.2)count(a其中 count(u4)和 count-)分别表示词串t和v-在语料中出现的次数,可想而知,当k很大时, count(o4)和 count(4-1)的统计将会多么耗时从公式(3.1)可以看出:一个词出现的慨率与它前面的所有词都相关.如果假定一个词出现的概率只与它前面固定数目的词相关呢?这就是n-gran模型的基本思想,它作了一个n-1阶的 Markov假设,认为一个词出现的概率就只与它前面的n-1个词相关,即-1)≈p(kk-1+),于是,(3.2)就变成了p(wxJuk-)count(n+1countri(3.3以〃=2为例,就有p(uk4-1)≈count(k-1, Wk)count(Wk-1)这样一简化,不仅使得单个参数的统计变得更容易(统计时需要匹配的词串更短),也使得参数的总数变少了那么, n-gran中的参数n取多大比较合适呢?一般来说,n的选取需要同时考虑计算复杂度和模型效果两个因素表1模型参数数量与n的关系模型参数数量1( ingram)2×1052(bigram)4×10103( trigram)8×10154(4grm)16×10在计算复杂度方面,表1给出了n-gram模型中模型参数数量随着n的逐渐增大而变化的情况,其中假定词典大小N=2000(汉语的词汇量大致是这个量级).事实上,模型参数的量级是N的指数函数(O(N"),显然n不能取得太大,实际应用中最多的是采用n=3的三元模型在模型效果方面,理论上是π越大,效果越奷.现如今,互联网的海量数据以及机器性能的提升使得计算更高阶的语言模型(如n>10)成为可能,但需要注意的是,当n大到一定程度时,模型效果的提升幅度会变小.例如,当n从1到2,再从2到3时,模型的效果上升显著,而从3到4时,效果的提升就不显著了(具体可参考吴军在《数学之美》中的相关章节).事实上,这里还涉及到一个可靠性和可区别性的问题,参数越多,可区别性越好,但同时单个参数的实例变少从而降低了可靠性,因此需要在可靠性和可区别性之间进行折中另外, n-gran模型中还有一个叫做平滑化的重要环节.回到公式(3.3),考虑两个问题:若 count(uk-n+1)=0,能否认为p(kln1-1)就等于0呢?若 count(kn+)= count(uk-+1,能否认为p(uur-)就等于1呢?显然不能!但这是一个无法回避的问题,哪怕你的语料库有多么大.平滑化技术就是用来处理这个问题的,这里不展开讨论,具体可参考[11总结起来,n-gram模型是这样一种模型,其主要工作是在语料中统计各种词串岀现的次数以及平滑化处理.概率值计算好之后就存储起来,下次需要计算一个句子的概率时,只需找到相关的概率参数,将它们连乘起来就好了然而,在机器学习领域有一种通用的招数是这样的:对所考虑的问题建模后先为其构造一个目标函数,然后对这个目标函数进行优化,从而求得一组最优的参数,最后利用这组最优参数对应的模型来进行预測对于统计语言模型而言,利用最大似然,可把目标函数设为plwlConteat(w))∈C其中C表示语料( Corpus), Context(u)表示词U的上下文( Context),即周边的词的集合.当 Context(u)为空时,就取p( Context(w)=p(u).特别地,对于前面介绍的 n-gran模型,就有 Context(mn)=2-n+1注3.1语料¢和词典仍的区别:词典仍是从语料¢中抽取岀来的,不存在重复的词;而语料C是指所有的文本內容,包括重复的词当然,实际应用中常采用最大对数似然,即把目标函数设为∑ logp(u( ontext(o)(3.4)然后对这个函数进行最大化从(3.4)可见,概率p( CONtex()已被视为关于和 Context()的函数,即p(w Context(w))= F(w, Conteact(w), 0)
- 2020-06-14下载
- 积分:1