Estimating the distribution and quantiles of data is a foundational task in data mining and data science. We study algorithms which provide accurate results for extreme quantile queries using a small amount of space, thus helping to understand the tails of the input distribution. Namely, we focus on two recent state-of-the-art solutions: $t$-digest and ReqSketch. While $t$-digest is a popular compact summary which works well in a variety of settings, ReqSketch comes with formal accuracy guarantees at the cost of its size growing as new observations are inserted. In this work, we provide insight into which conditions make one preferable to the other. Namely, we show how to construct inputs for $t$-digest that induce an almost arbitrarily large error and demonstrate that it fails to provide accurate results even on i.i.d. samples from a highly non-uniform distribution. We propose practical improvements to ReqSketch, making it faster than $t$-digest, while its error stays bounded on any instance. Still, our results confirm that $t$-digest remains more accurate on the ``non-adversarial'' data encountered in practice.
排序问题的两个最突出的解决方案是Quicksort和Mergesort。虽然快速排序平均速度非常快,但合并排序还提供了最坏情况的保证,但需要额外的空间来存储线性数量的元素。然而,最坏情况下的有效就地排序仍然是一个挑战:标准解决方案Heapsort存在缓存行为不佳的问题,并且对于缓存内实例来说也不是太快。在这项工作中,我们提出了中位数的中位数QuickMergesort(MoMQuickMergesort),QuickMergesort的一个新的变种,它结合了Quicksort与Mergesort允许后者实施到位。我们的新变体应用中位数的中位数算法选择枢轴,以规避二次最坏的情况。事实上,我们表明,它最多使用$n \log n + 1.6n$比较$n$足够大。我们通过实验证实了理论估计,并表明新算法的性能优于堆排序,并且仅比Introsort(stdlibc++的std::sort实现)慢10%左右,这对最坏情况的保证相当差。我们还模拟了最坏的情况,它只比平均情况慢10%左右。特别是,新算法是一个自然的候选人,以取代堆排序作为一个最坏情况下的塞子在Introsort。
Clustering under Local Stability: Bridging the Gap between Worst-Case and Beyond Worst-Case Analysis
最近,人们对聚类研究产生了浓厚的兴趣,这种研究采用了超越最坏情况的方法来分析算法。典型的想法是设计一个聚类算法,输出一个接近最优的解决方案,提供的数据满足自然的稳定性概念。例如,Bilu and Linial(2010)和Awasthi et al.(2012)提出了输出近似最优解的算法,假设最优解在输入距离的小扰动下保持不变。这种方法的一个缺点是,算法通常是根据稳定性假设显式构建的,并且在最坏的情况下没有保证;事实上,最近的几个算法输出任意坏的解决方案,即使只有一小部分数据不满足给定的稳定性概念。在这项工作中,我们以两种方式解决这一问题。首先,我们提供的算法,继承聚类近似算法的最坏情况下的保证,同时保证接近最优的解决方案时,数据是稳定的。我们的算法是对现有最先进的近似算法的自然修改。其次,我们开始研究局部稳定性,这是一个单一的最优集群,而不是整个最优解的属性。我们表明,我们的算法输出所有的最佳集群,满足稳定的局部。具体而言,我们在最近的稳定性概念下,在我们的局部框架中实现了强有力的积极结果,包括度量扰动弹性(Angelidakis et al. 2017)和稳健的扰动弹性(Balcan and Liang 2012),用于$k$ -中位数,$k$ -均值和对称/非对称$k$ -中心目标。