We present an algorithm and package, Redistributor, which forces a collection of scalar samples to follow a desired distribution. When given independent and identically distributed samples of some random variable $S$ and the continuous cumulative distribution function of some desired target $T$, it provably produces a consistent estimator of the transformation $R$ which satisfies $R(S)=T$ in distribution. As the distribution of $S$ or $T$ may be unknown, we also include algorithms for efficiently estimating these distributions from samples. This allows for various interesting use cases in image processing, where Redistributor serves as a remarkably simple and easy-to-use tool that is capable of producing visually appealing results. The package is implemented in Python and is optimized to efficiently handle large data sets, making it also suitable as a preprocessing step in machine learning. The source code is available at https://gitlab.com/paloha/redistributor.
翻译:我们提出了一个算法和软件包, 即“ 重新分配”, 要求收集标量样本, 以便按照预期的分布分布方式进行。 当给出一些随机可变S$的独立且分布相同的样本, 以及某些预期目标$T$的连续累积分布功能时, 它可以产生一个一致的变换估计值, 满足R( S) $ = T$ 的分布。 由于可能不知道美元或T美元的分布方式, 我们还包括了高效估计这些样本分布的算法。 这允许在图像处理中出现各种有趣的使用案例, 在图像处理中, 重新分配器是一个非常简单且易于使用的工具, 能够产生视觉吸引效果。 软件包在Python 实施, 并优化其高效处理大型数据集, 使其也适合作为机器学习的预处理步骤。 源码可在 https://gitlab.com/ paloha/redifiltor查阅 。